1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-31 05:37:59 +01:00

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.
This commit is contained in:
Joas Schilling 2014-05-24 14:28:38 +02:00
commit 1b73c217f0

View File

@ -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();