[ContextMenu] Safari Text Selection Gets Cleared by Context Menu
Bug report
When selecting text on a page in Safari and then right-clicking to open the context menu, the selected text gets cleared/unselected.
Steps to Reproduce
- Select some text on a page in Safari by highlighting with cursor.
- Right-click on the selected text.
- Observe that the context menu opens, but the text is no longer selected/highlighted.
https://github.com/radix-ui/primitives/assets/26709290/fae607fd-d8e8-4eae-bff6-e80797ce26ea
I fixed some of the problem with this prop to ContextMenuContent but still has problem
onOpenAutoFocus={(event: any) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
event.preventDefault();
}}
https://github.com/radix-ui/primitives/assets/26709290/e41243d4-6d4b-4682-958b-904db0873896
I don't have this problem in chrome.
I'm having the same bug with Popover. When I open the menu it de-selects the text in Safari. It's so annoying.
Able to reproduce here! Implementing a spellchecker which requires the text to stay focused. What can we do to help fix this?
Someone have found a workaround for this?
+1
Anybody figured this one out yet? Running into the same issue.