From 0616a43ed2e6785662f88330eb6c663d6863c542 Mon Sep 17 00:00:00 2001 From: Lee Kelleher Date: Thu, 7 Nov 2024 20:31:31 +0000 Subject: [PATCH] Bugfix: Disables Link Picker modal submit button (#2521) Link Picker modal, disables submit button if URL or querystring are not set. --- .../link-picker-modal/link-picker-modal.element.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/packages/multi-url-picker/link-picker-modal/link-picker-modal.element.ts b/src/packages/multi-url-picker/link-picker-modal/link-picker-modal.element.ts index 39c8a87112..4da0e7161a 100644 --- a/src/packages/multi-url-picker/link-picker-modal/link-picker-modal.element.ts +++ b/src/packages/multi-url-picker/link-picker-modal/link-picker-modal.element.ts @@ -5,13 +5,14 @@ import type { UmbLinkPickerModalValue, } from './link-picker-modal.token.js'; import { css, customElement, html, nothing, query, state, when } from '@umbraco-cms/backoffice/external/lit'; +import { isUmbracoFolder, UmbMediaTypeStructureRepository } from '@umbraco-cms/backoffice/media-type'; +import { umbFocus } from '@umbraco-cms/backoffice/lit-element'; import { UmbDocumentDetailRepository } from '@umbraco-cms/backoffice/document'; import { UmbMediaDetailRepository } from '@umbraco-cms/backoffice/media'; import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal'; import type { UmbInputDocumentElement } from '@umbraco-cms/backoffice/document'; import type { UmbInputMediaElement } from '@umbraco-cms/backoffice/media'; import type { UUIBooleanInputEvent, UUIInputEvent } from '@umbraco-cms/backoffice/external/uui'; -import { isUmbracoFolder, UmbMediaTypeStructureRepository } from '@umbraco-cms/backoffice/media-type'; type UmbInputPickerEvent = CustomEvent & { target: { value?: string } }; @@ -56,8 +57,10 @@ export class UmbLinkPickerModalElement extends UmbModalBaseElement @@ -169,7 +173,8 @@ export class UmbLinkPickerModalElement extends UmbModalBaseElement + @change=${this.#onLinkUrlInput} + ${umbFocus()}> ${when(