From b9c2f855e1c43dd31f377291d420036dd451fbb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Inez=20Korczyn=CC=81ski?= Date: Fri, 26 Apr 2013 12:31:21 -0700 Subject: [PATCH] (bug 47711) Fix FF specific bug Firefox fires key press events for arrow keys - but we handle them already in keydown - so the solution is to just ignore those key presses in the handler. Change-Id: I1aff295a0958b75697c4d362e0d6095283f37fe8 --- modules/ve/ce/ve.ce.Surface.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index 23093f6471..125a9615e9 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -410,7 +410,9 @@ ve.ce.Surface.prototype.onDocumentKeyPress = function ( e ) { } } - if ( ve.ce.isShortcutKey( e ) || + // FF fire keypress for arrow keys but we handle them in keydown so let's ignore + if ( ve.ce.isArrowKey( e.keyCode ) || + ve.ce.isShortcutKey( e ) || e.which === ve.Keys.DOM_VK_RETURN || e.which === ve.Keys.DOM_VK_BACK_SPACE || e.which === ve.Keys.DOM_VK_UNDEFINED ) {