Fix event handling in a Shadow DOM#1647
Open
sbaechler wants to merge 4 commits intodownshift-js:masterfrom
Open
Fix event handling in a Shadow DOM#1647sbaechler wants to merge 4 commits intodownshift-js:masterfrom
sbaechler wants to merge 4 commits intodownshift-js:masterfrom
Conversation
3a4988b to
40a575d
Compare
40a575d to
f7e0452
Compare
48a428f to
886b569
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
This fix adds a traversal through shadow roots to fix a long standing issue that Downshift is not properly working when rendered inside of a shadow DOM.
Fixes #1622
Why:
How:
The utility function
targetWithinDownshiftnow iterates through shadow roots to find the real active element.I also added a Cypress test to reproduce the issue in (
/shadow-dom/useMultipleCombobox) as well as a few unittests.We did have a patch for version 6 that also patched the tab order. However, in my manual tests in version 9 I did not see any issues with the tab order anymore.
Checklist:
I could not get the pre-commit hooks to pick up the proper test and format configuration. It might need some reformatting.