primitives icon indicating copy to clipboard operation
primitives copied to clipboard

Clicking dropdown menu trigger intermittently toggles nearby text selection on page

Open caprica opened this issue 2 years ago • 2 comments

Bug report

Current Behavior

In the dropdown demo page, if you quickly click the menu trigger button, it seems to propagate as a double-click to the underlying page and selects nearby text (in this case all of the text in the block immediately above the demo).

Admittedly this may be a contrived and atypical user interaction, but I was able to inadvertently trigger it enough times in my own application to notice it.

Short video attached.

Expected behavior

Clicking the menu trigger button should suppress such events.

Reproducible example

https://www.radix-ui.com/docs/primitives/components/dropdown-menu

Suggested solution

?

Additional context

Tested with Chrome on Linux, macOS and Windows, all with same result.

Issue did NOT happen for me on Firefox.

Seems similar maybe to #1658 .

Your environment

Software Name(s) Version
Radix Package(s) react-dropdown-menu 2.0.5
React n/a 18.2.0
Browser Chrome Version 114.0.5735.198 (Official Build) (64-bit)
Assistive tech
Node n/a 16.14.2
npm/yarn npm 8.5.0
Operating System Linux Mint, macOS, Windows 11 latest, fully updated

https://github.com/radix-ui/primitives/assets/1385879/7da07dac-6eaf-494d-8ce1-719e7c0c334d

caprica avatar Jul 11 '23 06:07 caprica

Admittedly this may be a contrived and atypical user interaction.

Agreed, I'll take a look if it can be fixed easily, but otherwise might not be worth it.

benoitgrelard avatar Mar 05 '24 14:03 benoitgrelard

Same issue here.

@radix-ui/react-dropdown-menu v2.0.6

https://github.com/radix-ui/primitives/assets/3471836/da503b35-7065-4e6b-bd38-03b83e373581

Garfield550 avatar Jun 05 '24 09:06 Garfield550