From 9d90750664747236a654f0272f0f226950b75e31 Mon Sep 17 00:00:00 2001 From: ilyabrower Date: Thu, 9 Jul 2026 13:36:44 +0200 Subject: [PATCH 1/4] [UIK-5565][dropdown-menu] fixed preventFocusByClick - skip draggable elements (#3045) ## Changelog ### @semcore/dropdown-menu #### Fixed - `preventFocusByClick` handler - skip draggable elements. ## Motivation and Context ## How has this been tested? ## Screenshots (if appropriate): ## Types of changes - [X] Bug fix (non-breaking change which fixes an issue). - [ ] New feature (non-breaking change which adds functionality). - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). - [ ] Nice improve. ## Checklist: - [ ] I have updated the documentation accordingly. - [ ] I have added new tests on added of fixed functionality. --- semcore/dropdown-menu/src/DropdownMenu.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/semcore/dropdown-menu/src/DropdownMenu.jsx b/semcore/dropdown-menu/src/DropdownMenu.jsx index 0b2775aa5a..8c3b7498fe 100644 --- a/semcore/dropdown-menu/src/DropdownMenu.jsx +++ b/semcore/dropdown-menu/src/DropdownMenu.jsx @@ -332,7 +332,9 @@ function List({ styles, Children }) { const SScrollContainer = ScrollAreaComponent.Container; const preventFocusByClick = React.useCallback((e) => { - e.preventDefault(); + if (!e.target.draggable) { + e.preventDefault(); + } }, []); return sstyled(styles)( From b83bcb4f0bc29d8b5efb5e8e9738c8a608dc7693 Mon Sep 17 00:00:00 2001 From: "ilia.brauer" Date: Fri, 10 Jul 2026 09:55:48 +0200 Subject: [PATCH 2/4] [bulk-textarea] fixed keyboardLineIndex on blur (UIK-3410) --- .../bulk-textarea/src/components/InputField/InputField.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/semcore/bulk-textarea/src/components/InputField/InputField.tsx b/semcore/bulk-textarea/src/components/InputField/InputField.tsx index 35c29dcbd8..e90d6cef5d 100644 --- a/semcore/bulk-textarea/src/components/InputField/InputField.tsx +++ b/semcore/bulk-textarea/src/components/InputField/InputField.tsx @@ -638,7 +638,9 @@ class InputField extends Component< onBlur(valueToChange as T, event); setTimeout(() => { - this.setState({ keyboardLineIndex: -1 }); + if (document.activeElement !== this.textarea) { + this.setState({ keyboardLineIndex: -1 }); + } }, 200); } From f3386efa479ce8975549c0331b7659f5abff1622 Mon Sep 17 00:00:00 2001 From: "ilia.brauer" Date: Fri, 10 Jul 2026 10:20:55 +0200 Subject: [PATCH 3/4] [bulk-textarea] fixed placeholder after removing first line by lineProcessing function (UIK-3510) --- semcore/bulk-textarea/src/BulkTextarea.tsx | 18 ++++++++++-------- .../src/components/InputField/InputField.tsx | 6 +++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/semcore/bulk-textarea/src/BulkTextarea.tsx b/semcore/bulk-textarea/src/BulkTextarea.tsx index 1c334d3653..3aefad3a27 100644 --- a/semcore/bulk-textarea/src/BulkTextarea.tsx +++ b/semcore/bulk-textarea/src/BulkTextarea.tsx @@ -234,6 +234,14 @@ class BulkTextareaRoot extends Component< this.handlers.showErrors(false); this.handlers.errors([]); this.handlers.state('normal'); + + if (document.activeElement === this.clearAllButtonRef.current) { + const textarea = this.inputFieldRef.current?.querySelector('[role="textbox"]'); + + if (textarea instanceof HTMLDivElement) { + textarea.focus(); + } + } } }; @@ -241,15 +249,9 @@ class BulkTextareaRoot extends Component< this.handlers.showErrors(false); this.handlers.errors([]); this.setState({ errorIndex: -1 }); - // @ts-ignore - this.handlers.value('', e); + // @ts-ignore (we should set right type of value depending on the type of value passed) + this.handlers.value(typeof this.asProps.value === 'string' ? '' : [], e); this.handlers.state('normal'); - - const textarea = this.inputFieldRef.current?.querySelector('[role="textbox"]'); - - if (textarea instanceof HTMLDivElement) { - textarea.focus(); - } }; handleChangeErrorIndex = (amount: number) => () => { diff --git a/semcore/bulk-textarea/src/components/InputField/InputField.tsx b/semcore/bulk-textarea/src/components/InputField/InputField.tsx index e90d6cef5d..3d086c8a21 100644 --- a/semcore/bulk-textarea/src/components/InputField/InputField.tsx +++ b/semcore/bulk-textarea/src/components/InputField/InputField.tsx @@ -218,7 +218,11 @@ class InputField extends Component< if (paragraph instanceof HTMLParagraphElement) { if (newValue === '') { - paragraph.innerHTML = this.emptyLineValue; + if (lines.length === 1) { + this.textarea.textContent = ''; + } else { + paragraph.innerHTML = this.emptyLineValue; + } } else { paragraph.replaceChild(newValueTextNode, paragraph.childNodes.item(0)); } From 397d8e11d0e9f74e64f38c584e6b15266ef9370b Mon Sep 17 00:00:00 2001 From: Valeryia Zimnitskaya Date: Mon, 13 Jul 2026 16:57:04 +0200 Subject: [PATCH 4/4] [bulk-textarea] update test --- .../bulk-textarea/__tests__/bulk-textarea.browser-test.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/semcore/bulk-textarea/__tests__/bulk-textarea.browser-test.tsx b/semcore/bulk-textarea/__tests__/bulk-textarea.browser-test.tsx index 98cf1f711d..246c8fa25a 100644 --- a/semcore/bulk-textarea/__tests__/bulk-textarea.browser-test.tsx +++ b/semcore/bulk-textarea/__tests__/bulk-textarea.browser-test.tsx @@ -680,9 +680,7 @@ test.describe(`${TAG.FUNCTIONAL}`, () => { expect(lineCount).toBe(2); await expect(locators.counter(page)).toHaveText('1/10of 10 lines'); - const firstLineText = await locators.row(page, 0).textContent(); - - expect(firstLineText).not.toMatch(/^http:\/\//); + await expect(locators.row(page, 0)).not.toHaveText(/^http:\/\//); await locators.button(page, 'Clear all').click(); await page.waitForTimeout(100);