From 6c5406dd99bfe674e73a8034de8369878b0aaadd Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Sun, 18 Nov 2012 00:58:27 +0100 Subject: [PATCH] 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). --- NEWS.mdtext | 5 ++++- www/media/idf/js/jquery.hotkeys.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS.mdtext b/NEWS.mdtext index 9575c7f..b405ba6 100644 --- a/NEWS.mdtext +++ b/NEWS.mdtext @@ -30,10 +30,13 @@ or newer to run properly! the project's URL, logo and individual SCM settings are copied by default. - Wiki pages couldn't be properly saved with E_NOTICE enabled because - of a syntax error (fixes issue 808) + of a syntax error (fixes issue 808). - Indefero now shows detected copies in git changesets. +- A user is no longer redirected to the Help page if he enters 'H' in the + password text field on the login page (fixes issue 821). + # InDefero 1.3.2 - Wed May 09 20:05 2012 UTC ## Bugfixes diff --git a/www/media/idf/js/jquery.hotkeys.js b/www/media/idf/js/jquery.hotkeys.js index 73c552f..5e53e19 100644 --- a/www/media/idf/js/jquery.hotkeys.js +++ b/www/media/idf/js/jquery.hotkeys.js @@ -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; }