mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
225a3fc646
The mobile drawer is a modal dialog, but the Tab trap was bound to .root only, while the backdrop button renders as a sibling OUTSIDE .root — so Tab from the backdrop (or any out-of-root node) could escape the modal. Move the trap to the host keydown listener (keydown is composed, so it catches the backdrop too) and include the backdrop in the focusable cycle; keep initial focus on the first real control. Adds a regression test for backdrop/outside-root Tab containment.