Commit 9b9dc89
fix(metrics): Prevent metric selector hover from stealing search input focus
When hovering over options in the metric selector listbox,
setFocused(true) was triggering a useEffect in useSelectableItem that
called focusSafely(ref.current), stealing DOM focus from the search
input. Replace setFocused(true) with only setFocusedKey for hover, and
track hover state separately so options still get visual focus styling
without moving actual DOM focus.
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Made-with: Cursor1 parent 30448b1 commit 9b9dc89
File tree
1 file changed
+7
-2
lines changed- static/app/views/explore/metrics/metricToolbar
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| 600 | + | |
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
607 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
608 | 611 | | |
| 612 | + | |
609 | 613 | | |
| 614 | + | |
610 | 615 | | |
611 | 616 | | |
612 | 617 | | |
| |||
617 | 622 | | |
618 | 623 | | |
619 | 624 | | |
620 | | - | |
| 625 | + | |
621 | 626 | | |
622 | 627 | | |
623 | 628 | | |
| |||
0 commit comments