fix: do not process tab key in editor when document is hidden

This commit is contained in:
Baptiste Grob
2021-01-27 11:24:01 +01:00
parent 6489628731
commit 929c11addc

View File

@@ -1198,7 +1198,7 @@ class EditorViewCtrl extends PureViewCtrl<{}, EditorState> {
element: editor,
key: KeyboardKey.Tab,
onKeyDown: (event) => {
if (this.note.locked || event.shiftKey) {
if (document.hidden || this.note.locked || event.shiftKey) {
return;
}
event.preventDefault();