Fix listbox closing immediately after opening on touch devices#3755
Fix listbox closing immediately after opening on touch devices#3755RobinMalfait merged 6 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
JSDOM Doesn't support PointerEvent yet, so let's add this to the polyfills.
Rely on: - `PointerDown` in case `pointerType === 'mouse'` - `Click` in case `pointerType !== 'mouse'` This makes the tests pass, and also makes sure that clicking on the ListboxButton while the Listbox is open doesn't close and auto opens again but stays closed.
|
Couldn't reproduce this on a physical Android device in Chrome, but could reproduce it via the Chrome Devtools. Made some adjustments by essentially copying the full Re-using the logic was necessary to prevent a bug where clicking the ListboxButton in an open Listbox closed the Listbox and immediately re-opened it. My initial thinking was to use the trim.C7EAA7D7-87E1-4BB6-A522-106C1613A364.MOVRe tests: I'm not sure how realistic it is to introduce these browser tests in this PR. I did manually test on Chrome and Safari (in normal mode, where |
Fixes #3750
@RobinMalfait is this the right approach?