formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
121 stars 4 forks source link

Trap focus is interfering with Popover Content #358

Open mareksed opened 6 hours ago

mareksed commented 6 hours ago

Describe the bug It seems like focus trap is always handling the focus even though it has been already handled by the rich text editor (lexical in this case)

To Reproduce https://codesandbox.io/p/sandbox/interesting-ace-v4pnxc

the editor outside of the popover, the one inside popover will move focus to button inside popover.

Expected behavior popover does not override behaviour of the content

https://github.com/user-attachments/assets/7f88f06a-e5de-4783-877b-ebe07e4f31c9

blvdmitry commented 6 hours ago

Interesting use case, I think trap focus just doesn't include the div role="textbox" with contenteditable as a focusable element right now. I'm going to add it and test it out