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

Fix Kana-Kanji input on Mac Safari

Resolves #332
This commit is contained in:
Neil Jenkins 2018-10-15 08:38:24 +11:00
parent fddf91b9c8
commit 5b998f5b6f
3 changed files with 8 additions and 4 deletions

View file

@ -1340,7 +1340,9 @@ var onKey = function ( event ) {
if ( this._keyHandlers[ key ] ) {
this._keyHandlers[ key ]( this, event, range );
} else if ( !range.collapsed && !event.ctrlKey && !event.metaKey &&
// !event.isComposing stops us from blatting Kana-Kanji conversion in Safari
} else if ( !range.collapsed && !event.isComposing &&
!event.ctrlKey && !event.metaKey &&
( event.key || key ).length === 1 ) {
// Record undo checkpoint.
this.saveUndoState( range );

File diff suppressed because one or more lines are too long

View file

@ -59,7 +59,9 @@ var onKey = function ( event ) {
if ( this._keyHandlers[ key ] ) {
this._keyHandlers[ key ]( this, event, range );
} else if ( !range.collapsed && !event.ctrlKey && !event.metaKey &&
// !event.isComposing stops us from blatting Kana-Kanji conversion in Safari
} else if ( !range.collapsed && !event.isComposing &&
!event.ctrlKey && !event.metaKey &&
( event.key || key ).length === 1 ) {
// Record undo checkpoint.
this.saveUndoState( range );