Skip to content

Commit 7bc63ea

Browse files
nsdeschenesClaude Sonnet 4
andcommitted
fix(metrics): Remove Home/End key handlers from metric selector search input
Home and End keys were intercepted and prevented from propagating to the search input, breaking cursor navigation to the start/end of typed text. Since the input always retains DOM focus via virtual focus, these keys should be passed through to the input element unchanged. Co-Authored-By: Claude Sonnet 4 <noreply@example.com>
1 parent 40355bc commit 7bc63ea

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -420,26 +420,6 @@ export function MetricSelector({
420420
}
421421
return;
422422
}
423-
424-
if (e.key === 'Home') {
425-
e.preventDefault();
426-
manager.setFocused(true);
427-
const firstKey = collection.getFirstKey();
428-
if (firstKey !== null) {
429-
manager.setFocusedKey(firstKey);
430-
}
431-
return;
432-
}
433-
434-
if (e.key === 'End') {
435-
e.preventDefault();
436-
manager.setFocused(true);
437-
const lastKey = collection.getLastKey();
438-
if (lastKey !== null) {
439-
manager.setFocusedKey(lastKey);
440-
}
441-
return;
442-
}
443423
},
444424
[focusedKey, displayedOptionsMap, handleSelect, listState]
445425
);

0 commit comments

Comments
 (0)