Add keyboard shortcut pass-through for tab navigation in CodeMirror editors

Co-authored-by: Pragadesh44-Bruno <172116368+Pragadesh44-Bruno@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-27 08:50:31 +00:00
parent 4e5846f3bd
commit c4a2d52cc9
5 changed files with 141 additions and 100 deletions

View File

@@ -62,7 +62,20 @@ class MultiLineEditor extends Component {
'Ctrl-F': () => {},
// Tabbing disabled to make tabindex work
Tab: false,
'Shift-Tab': false
'Shift-Tab': false,
// Pass through tab navigation shortcuts to global handlers
'Cmd-W': () => CodeMirror.Pass,
'Ctrl-W': () => CodeMirror.Pass,
'Cmd-Shift-W': () => CodeMirror.Pass,
'Ctrl-Shift-W': () => CodeMirror.Pass,
'Cmd-PageUp': () => CodeMirror.Pass,
'Ctrl-PageUp': () => CodeMirror.Pass,
'Cmd-PageDown': () => CodeMirror.Pass,
'Ctrl-PageDown': () => CodeMirror.Pass,
'Cmd-Shift-PageUp': () => CodeMirror.Pass,
'Ctrl-Shift-PageUp': () => CodeMirror.Pass,
'Cmd-Shift-PageDown': () => CodeMirror.Pass,
'Ctrl-Shift-PageDown': () => CodeMirror.Pass
}
});