0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

If ctrl/meta held down, key is not inserting text

This commit is contained in:
Neil Jenkins 2018-03-26 10:06:01 +01:00
parent e4566b8b3a
commit 389daab664

View file

@ -59,7 +59,8 @@ var onKey = function ( event ) {
if ( this._keyHandlers[ key ] ) { if ( this._keyHandlers[ key ] ) {
this._keyHandlers[ key ]( this, event, range ); this._keyHandlers[ key ]( this, event, range );
} else if ( !range.collapsed && ( event.key || key ).length === 1 ) { } else if ( !range.collapsed && !event.ctrlKey && !event.metaKey &&
( event.key || key ).length === 1 ) {
// Record undo checkpoint. // Record undo checkpoint.
this.saveUndoState( range ); this.saveUndoState( range );
// Delete the selection // Delete the selection