Commit 8088b6f
Fix focus loss in customize popover after Reassign and other state transitions
When the Reassign button (or any focused element inside the feedback
banner) was removed from the DOM during a rec-state transition, browser
focus fell to document.body. The popover's scoped KeyHandler only
receives events that traverse its DOM subtree, so it went deaf to
subsequent keypresses — the user saw row flash animations instead of
conflict detection.
Two fixes:
1. Add a use-effect that re-focuses the popover element whenever
rec-state changes and focus has drifted outside the popover.
2. After refresh! reinstalls global shortcut handlers, re-suppress
them if a scoped key handler is still active (refcount > 0),
preventing the 50ms window where global handlers could intercept
keypresses meant for the popover.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent ed0d6f0 commit 8088b6f
1 file changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
431 | 437 | | |
432 | 438 | | |
433 | 439 | | |
| |||
638 | 644 | | |
639 | 645 | | |
640 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
641 | 658 | | |
642 | 659 | | |
643 | 660 | | |
| |||
0 commit comments