diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-24 14:28:38 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-24 14:28:38 +0200 |
commit | 1b73c217f0ba80e448bb3f34ffe8ed082fa5e99f (patch) | |
tree | b12bc4c91df1e9da8836ec6a24db0fbf235ba94d /phpBB/assets/javascript | |
parent | c7f51ca1a79c98dd607caa89e412ac7dc6c91827 (diff) | |
parent | bc31a0d2526a71cd819f9ac08e9fe2e8fb009de5 (diff) | |
download | forums-1b73c217f0ba80e448bb3f34ffe8ed082fa5e99f.tar forums-1b73c217f0ba80e448bb3f34ffe8ed082fa5e99f.tar.gz forums-1b73c217f0ba80e448bb3f34ffe8ed082fa5e99f.tar.bz2 forums-1b73c217f0ba80e448bb3f34ffe8ed082fa5e99f.tar.xz forums-1b73c217f0ba80e448bb3f34ffe8ed082fa5e99f.zip |
Merge pull request #2458 from prototech/ticket/12543
[ticket/12543] Only take over ENTER and ESC keys when alert box is active.
* prototech/ticket/12543:
[ticket/12543] Only take over ENTER and ESC keys when alert box is active.
Diffstat (limited to 'phpBB/assets/javascript')
-rw-r--r-- | phpBB/assets/javascript/core.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 3cb41039cf..9eba80542c 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -84,8 +84,8 @@ phpbb.alert = function(title, msg, fadedark) { e.stopPropagation(); }); - $(document).bind('keydown', function(e) { - if (e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) { + $(document).keydown(function(e) { + if ((e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) && dark.is(':visible')) { dark.trigger('click'); e.preventDefault(); |