IE triggers keyPress for Esc. We should not delete selected text when this keyPress happens.

Change-Id: I8028ba960d7e7ea15e56701850cd214bacc6a232
This commit is contained in:
Christian Williams 2012-08-20 17:39:33 -07:00
parent fcf4e53f14
commit 9d7f4e94b5

View file

@ -471,7 +471,8 @@ ve.ce.Surface.prototype.onKeyPress = function ( e ) {
this.startPolling();
}
if ( selection.getLength() > 0 && e.which !== 0 ) {
// Is there an expanded range and something other than keycodes 0 (nothing) or 27 (esc) were pressed?
if ( selection.getLength() > 0 && ( e.which !== 0 || e.which !== 27 ) {
this.stopPolling();
this.model.change(
ve.dm.Transaction.newFromRemoval(