Firefox: Fix dropdowns not opening with touch (#1923)
Fixes #1921 ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. On firefox... 2. Use a touch device (or devtools)... 3. Try to open a dropdown menu, eg: main menu, styles menu, more tools menu. 4. Make sure the menu opens correctly. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Firefox: Fixed dropdown menus not opening with touch.
This commit is contained in:
parent
0e621e3de1
commit
db58d9c54f
1 changed files with 7 additions and 1 deletions
|
@ -33,7 +33,13 @@ export function Trigger({
|
||||||
'data-testid'?: string
|
'data-testid'?: string
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<DropdownMenu.Trigger dir="ltr" data-testid={testId} asChild>
|
<DropdownMenu.Trigger
|
||||||
|
dir="ltr"
|
||||||
|
data-testid={testId}
|
||||||
|
asChild
|
||||||
|
// Firefox fix: Stop the dropdown immediately closing after touch
|
||||||
|
onTouchEnd={(e) => preventDefault(e)}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</DropdownMenu.Trigger>
|
</DropdownMenu.Trigger>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue