Ignore backspace keypress

Firefox triggers a keypress event for backspace. We handle backspace in keydown, so this keypress event should be ignored.

Change-Id: I6a481dbd5df0cf4558a5f1975717ca809250ccda
This commit is contained in:
Christian Williams 2012-10-16 12:23:57 -07:00
parent 177557808b
commit 7a2faf7daf

View file

@ -654,7 +654,7 @@ ve.ce.Surface.prototype.onPaste = function () {
* @param {jQuery.Event} e
*/
ve.ce.Surface.prototype.onKeyPress = function ( e ) {
if ( ve.ce.Surface.isShortcutKey( e ) || e.which === 13 || e.which === 0 ) {
if ( ve.ce.Surface.isShortcutKey( e ) || e.which === 13 || e.which === 8 || e.which === 0 ) {
return;
}