From db58d9c54fb483bd1dce34313f3e0a1c9687b6d8 Mon Sep 17 00:00:00 2001 From: Lu Wilson Date: Tue, 19 Sep 2023 15:58:10 +0100 Subject: [PATCH] Firefox: Fix dropdowns not opening with touch (#1923) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../src/lib/ui/components/primitives/DropdownMenu.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/tldraw/src/lib/ui/components/primitives/DropdownMenu.tsx b/packages/tldraw/src/lib/ui/components/primitives/DropdownMenu.tsx index 38d958002..bd5781ce8 100644 --- a/packages/tldraw/src/lib/ui/components/primitives/DropdownMenu.tsx +++ b/packages/tldraw/src/lib/ui/components/primitives/DropdownMenu.tsx @@ -33,7 +33,13 @@ export function Trigger({ 'data-testid'?: string }) { return ( - + preventDefault(e)} + > {children} )