From 864eacfbd7bd1318317ad9ae13cb9928f8ee0ead Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 29 Jun 2012 10:23:59 +0200 Subject: [PATCH] Fix #873 prevent Firefox from cancling active XMLHttpRequests pressing escape --- source/Ox.UI/js/Core/Keyboard.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/Ox.UI/js/Core/Keyboard.js b/source/Ox.UI/js/Core/Keyboard.js index 38a018d6..9bbd4d33 100644 --- a/source/Ox.UI/js/Core/Keyboard.js +++ b/source/Ox.UI/js/Core/Keyboard.js @@ -77,6 +77,11 @@ Ox.Keyboard = (function() { buffer = ''; }, 1000); + //Firefox will cancel active XMLHttpRequests otherwise + if (keyName == 'escape') { + event.preventDefault(); + } + return ret; }