Repository navigation
fix(sidebar): keep the hover peek under a drag and for keyboard focus - #3074
Conversation
…, and let open menus take Escape first Fixes #3070
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…t, and narrow what takes Escape first
|
Review summary (omo + Codex Terra xhigh). Verdict CLEAR at 7106973. Fix round (8dedcb3), from the first review's reproduced MEDIUM: when the peek hides with the focus in it (an empty filter's Escape), the focus now goes to the sidebar toggle instead of falling to the page; the regression asserts it (failed first). Escape now yields only to a modal dialog, a menu/popover the focus is in or on, or a sidebar field whose Escape does something; the drag flag is also cleared by a Remaining, all LOW and unreproduced (left as notes, no follow-up issue):
Validation at 7106973 (merge with main): |
Summary
Fixes #3070, the follow-up to #3067 (Settings → Appearance → Show the sidebar on hover, opt-in, off by default).
Why the drag broke it: Chromium fires
pointercancelandpointerleaveon the<aside>when a native drag starts, so the close grace started mid-drag. After a drop it reports no pointer position until the next move, so a drop on the sidebar holds the peek until that move; the move then either re-enters it (pointerenter) or leaves it with the grace already running.Validation
scripts/sidebar-peek-demo-regression.tsgains two steps, each failing first:bun scripts/sidebar-peek-demo-regression.ts: PASS at 1280 and 390, dark and light.bun test src/lib/sidebarPeek.test.tspass;bun run check fastpass (typecheck, build, unit 12400 pass / 0 fail).bun run check fulland the rest of the browser lane (CI).