aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/assets/javascript')
-rw-r--r--phpBB/assets/javascript/core.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 3cb41039cf..296c5b0ef9 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -15,7 +15,7 @@ var dark = $('#darkenwrapper');
var loadingIndicator = $('#loading_indicator');
var phpbbAlertTimer = null;
-var isTouch = (window && typeof window.ontouchstart !== 'undefined');
+phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
/**
* Display a loading screen
@@ -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();
@@ -1011,7 +1011,7 @@ phpbb.resizeTextArea = function(items, options) {
resetCallback: function(item) { }
};
- if (isTouch) return;
+ if (phpbb.isTouch) return;
if (arguments.length > 1) {
configuration = $.extend(configuration, options);