mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Let the browser handle shift-delete.
Apparently it's "cut" on Windows. Who knew.
This commit is contained in:
parent
3296e7576e
commit
cb9292721c
3 changed files with 17 additions and 11 deletions
|
@ -3094,15 +3094,18 @@ proto._onKey = function ( event ) {
|
|||
key = 'f' + ( code - 111 );
|
||||
}
|
||||
|
||||
// We need to apply the backspace/delete handlers regardless of modifiers.
|
||||
// We need to apply the backspace/delete handlers regardless of
|
||||
// control key modifiers.
|
||||
if ( key !== 'backspace' && key !== 'delete' ) {
|
||||
if ( event.altKey ) { modifiers += 'alt-'; }
|
||||
if ( event.altKey ) { modifiers += 'alt-'; }
|
||||
if ( event.ctrlKey ) { modifiers += 'ctrl-'; }
|
||||
if ( event.metaKey ) { modifiers += 'meta-'; }
|
||||
if ( event.shiftKey ) { modifiers += 'shift-'; }
|
||||
|
||||
key = modifiers + key;
|
||||
}
|
||||
// However, on Windows, shift-delete is apparently "cut" (WTF right?), so
|
||||
// we want to let the browser handle shift-delete.
|
||||
if ( event.shiftKey ) { modifiers += 'shift-'; }
|
||||
|
||||
key = modifiers + key;
|
||||
|
||||
if ( keyHandlers[ key ] ) {
|
||||
keyHandlers[ key ]( this, event );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2009,15 +2009,18 @@ proto._onKey = function ( event ) {
|
|||
key = 'f' + ( code - 111 );
|
||||
}
|
||||
|
||||
// We need to apply the backspace/delete handlers regardless of modifiers.
|
||||
// We need to apply the backspace/delete handlers regardless of
|
||||
// control key modifiers.
|
||||
if ( key !== 'backspace' && key !== 'delete' ) {
|
||||
if ( event.altKey ) { modifiers += 'alt-'; }
|
||||
if ( event.altKey ) { modifiers += 'alt-'; }
|
||||
if ( event.ctrlKey ) { modifiers += 'ctrl-'; }
|
||||
if ( event.metaKey ) { modifiers += 'meta-'; }
|
||||
if ( event.shiftKey ) { modifiers += 'shift-'; }
|
||||
|
||||
key = modifiers + key;
|
||||
}
|
||||
// However, on Windows, shift-delete is apparently "cut" (WTF right?), so
|
||||
// we want to let the browser handle shift-delete.
|
||||
if ( event.shiftKey ) { modifiers += 'shift-'; }
|
||||
|
||||
key = modifiers + key;
|
||||
|
||||
if ( keyHandlers[ key ] ) {
|
||||
keyHandlers[ key ]( this, event );
|
||||
|
|
Loading…
Reference in a new issue