mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
ignore keypress on contenteditable
This commit is contained in:
@@ -173,7 +173,9 @@ chrome.extension.sendMessage({}, function(response) {
|
|||||||
var keyCode = String.fromCharCode(event.keyCode).toUpperCase().charCodeAt();
|
var keyCode = String.fromCharCode(event.keyCode).toUpperCase().charCodeAt();
|
||||||
|
|
||||||
// Ignore keypress event if typing in an input box
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user