json-viewer icon indicating copy to clipboard operation
json-viewer copied to clipboard

Fix back keyboard shortcut

Open dnicolson opened this issue 3 years ago • 0 comments

This pull request disables some of the key command functionality of CodeMirror, enabling Chrome browser keyboard shortcuts to navigate back. Fixes https://github.com/tulios/json-viewer/issues/124.

For some reason, the extraKeyMap object had to be used to restore the "Cmd-Left" command.

https://github.com/tulios/json-viewer/issues/220 could also be fixed by adding "Page Up" and "Page Down" keys to extraKeyMap and scrolling the CodeMirror editor. For the space key to scroll down may require adding a "keydown" listener though.

dnicolson avatar Feb 21 '21 19:02 dnicolson