stable

Clone or download

Read-only

fix: Use ShadowDOM to delegate focus to search input

How to test: - In TLP-doc or in the Artifact modal Links field, when you click (or focus and hit Enter key) the Lazybox element, then the search input in the dropdown should be focused. You can click only once on the element and then type something to search. - after selecting a value (with mouse or keyboard) or closing the dropdown by pressing Escape key, the Lazybox element is focused again. - No other functional change expected. Pressing "Enter" in the search field still does not submit the Artifact modal. The dropdown still reacts to changes, if you type something or if you change the link type. Notes: - The "weird bugs where things stop reacting" seems to have disappeared. It was probably caused by the complexity of the progressive migration to custom elements. Now that everything is migrated, it does not seem to occur anymore. We can safely render part of the dropdown even when it's not open. fixes request #32649 Search input should be focused when first opening Lazybox dropdown Change-Id: Ib25c2536e0cf7c7368d39bd8a349e5a15bada37d

Modified Files

Name
M lib/frontend/lazybox/src/LazyboxElement.test.ts +2 −2 Go to diff View file
M lib/frontend/lazybox/src/LazyboxElement.ts +2 −2 Go to diff View file
M lib/frontend/lazybox/src/SearchInput.test.ts +1 −25 Go to diff View file
M lib/frontend/lazybox/src/SearchInput.ts +25 −39 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownElement.test.ts +0 −7 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownElement.ts +0 −4 Go to diff View file
A lib/frontend/lazybox/src/search_input.scss +32 −0 Go to diff View file
M lib/frontend/lazybox/themes/_common.scss +4 −0 Go to diff View file
M lib/frontend/lazybox/themes/style.scss +4 −15 Go to diff View file