Skip to content

Commit 07a31d3

Browse files
mpcgridMihai Popescu
andauthored
fix(webapp) : fixed Cmd+Left Arrow was intercepted by the TreeView component (#2772)
Fixed the issue where Cmd+Left Arrow was being intercepted by the TreeView component on task runs screen. Solution: Added a check in the getTreeProps keyboard handler to detect when metaKey (Cmd on macOS) is pressed with Left Arrow. When detected, the handler returns early without preventing the default browser behavior, allowing Chrome's native back navigation to work. Closes #<issue> ## ✅ Checklist - [ x] I have followed every step in the [contributing guide](https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md) - [ x] The PR title follows the convention. - [ x] I ran and tested the code works --- ## Testing Went to the task details page and confirmed that Cmd + Left Arrow will navigate back --- ## Changelog Modified TreeView.tsx to check for e.metaKey before handling Left Arrow key events When Cmd+Left is pressed, the event is no longer prevented, allowing browser default behavior --- Co-authored-by: Mihai Popescu <[email protected]>
1 parent da111e2 commit 07a31d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/webapp/app/components/primitives/TreeView/TreeView.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ export function useTree<TData, TFilterValue>({
423423
}
424424
case "Left":
425425
case "ArrowLeft": {
426+
if (e.metaKey) {
427+
return;
428+
}
429+
426430
e.preventDefault();
427431

428432
const selected = selectedIdFromState(state.nodes);

0 commit comments

Comments
 (0)