Ignore key event without vsc (#405)

It was causing problem with force disable key bindings and it will fix it.
This commit is contained in:
Can Arslan
2018-12-15 20:25:20 +03:00
committed by Ilya Grigorik
parent e24b95dd84
commit 7c633f3986

View File

@@ -317,6 +317,11 @@ chrome.runtime.sendMessage({}, function(response) {
return false; return false;
} }
// Ignore keydown event if typing in a page without vsc
if (!document.querySelector(".vsc-controller")) {
return false;
}
if (keyCode == tc.settings.displayKeyCode) { if (keyCode == tc.settings.displayKeyCode) {
runAction('display', document, true) runAction('display', document, true)
} }