Fix a problem in jquery.hotkeys that triggered global hotkeys when one was

in a password text field. Upstream should know of this problem for a long
time already, but hasn't released a fixed version yet, so we're applying
our own patch here (fixes issue 821).
This commit is contained in:
Thomas Keller
2012-11-18 00:58:27 +01:00
parent 4aa4100532
commit 6c5406dd99
2 changed files with 5 additions and 2 deletions

View File

@@ -44,7 +44,7 @@
handleObj.handler = function( event ) {
// Don't fire in text-accepting inputs that we didn't directly bind to
if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
if ( this !== event.target && (/textarea|select|input/i.test( event.target.nodeName ) ||
event.target.type === "text" || $(event.target).prop('contenteditable') == 'true' )) {
return;
}