mirror of
https://github.com/fastmail/Squire.git
synced 2025-01-03 05:00:13 -05:00
Update to latest squire build
This commit is contained in:
parent
db6aaee0dc
commit
4ec6f03d68
2 changed files with 8 additions and 14 deletions
|
@ -2228,10 +2228,11 @@ var onPaste = function ( event ) {
|
|||
}, 0 );
|
||||
};
|
||||
|
||||
// On Windows you can drag an drop text.
|
||||
// On Windows you can drag an drop text. We can't handle this ourselves, because
|
||||
// as far as I can see, there's no way to get the drop insertion point. So just
|
||||
// save an undo state and hope for the best.
|
||||
var onDrop = function ( event ) {
|
||||
var dataTransfer = event.dataTransfer;
|
||||
var types = dataTransfer.types;
|
||||
var types = event.dataTransfer.types;
|
||||
var l = types.length;
|
||||
var hasPlain = false;
|
||||
var hasHTML = false;
|
||||
|
@ -2247,15 +2248,8 @@ var onDrop = function ( event ) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if ( hasHTML ) {
|
||||
event.preventDefault();
|
||||
this.insertHTML( dataTransfer.getData( 'text/html' ), true );
|
||||
return;
|
||||
}
|
||||
if ( hasPlain ) {
|
||||
event.preventDefault();
|
||||
this.insertPlainText( dataTransfer.getData( 'text/plain' ), true );
|
||||
return;
|
||||
if ( hasHTML || hasPlain ) {
|
||||
this.saveUndoState();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue