Skip to content

Commit 31809c1

Browse files
nsdeschenesclaude
andcommitted
fix(metrics): Reset virtual focus when closing metric selector
Clear the focused key on close so re-opening the dropdown doesn't show a stale highlight. The selected item remains visually indicated via its selection state instead. Co-Authored-By: Claude Opus <noreply@anthropic.com> Made-with: Cursor
1 parent cd29da7 commit 31809c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

static/app/views/explore/metrics/metricToolbar/metricSelector.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ export function MetricSelector({
155155
}
156156

157157
setSearchInputValue('');
158+
listState.selectionManager.setFocused(false);
159+
listState.selectionManager.setFocusedKey(null);
158160
if (
159161
document.activeElement === document.body ||
160162
wrapperRef.current?.contains(document.activeElement)

0 commit comments

Comments
 (0)