From 37e2d32acef0b1dceff773b79da323d87ed05c00 Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Sat, 7 Nov 2015 12:27:34 -0800 Subject: [PATCH] ignore keypress on contenteditable --- inject.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inject.js b/inject.js index c74cbda..f5aa25d 100644 --- a/inject.js +++ b/inject.js @@ -173,7 +173,9 @@ chrome.extension.sendMessage({}, function(response) { var keyCode = String.fromCharCode(event.keyCode).toUpperCase().charCodeAt(); // Ignore keypress event if typing in an input box - if (document.activeElement.nodeName === 'INPUT' && document.activeElement.getAttribute('type') === 'text') { + if ((document.activeElement.nodeName === 'INPUT' + && document.activeElement.getAttribute('type') === 'text') + || document.activeElement.isContentEditable) { return false; }