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:
parent
e4566b8b3a
commit
389daab664
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue