mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
parent
884f352846
commit
60169dce6b
3 changed files with 30 additions and 10 deletions
|
@ -3117,8 +3117,18 @@ proto._onPaste = function ( event ) {
|
|||
setTimeout( function () {
|
||||
try {
|
||||
// Get the pasted content and clean
|
||||
var frag = empty( detach( pasteArea ) ),
|
||||
first = frag.firstChild,
|
||||
var frag = self._doc.createDocumentFragment(),
|
||||
next = pasteArea,
|
||||
first, range;
|
||||
|
||||
// #88: Chrome can apparently split the paste area if certain
|
||||
// content is inserted; gather them all up.
|
||||
while ( pasteArea = next ) {
|
||||
next = pasteArea.nextSibling;
|
||||
frag.appendChild( empty( detach( pasteArea ) ) );
|
||||
}
|
||||
|
||||
first = frag.firstChild;
|
||||
range = self._createRange(
|
||||
startContainer, startOffset, endContainer, endOffset );
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1685,8 +1685,18 @@ proto._onPaste = function ( event ) {
|
|||
setTimeout( function () {
|
||||
try {
|
||||
// Get the pasted content and clean
|
||||
var frag = empty( detach( pasteArea ) ),
|
||||
first = frag.firstChild,
|
||||
var frag = self._doc.createDocumentFragment(),
|
||||
next = pasteArea,
|
||||
first, range;
|
||||
|
||||
// #88: Chrome can apparently split the paste area if certain
|
||||
// content is inserted; gather them all up.
|
||||
while ( pasteArea = next ) {
|
||||
next = pasteArea.nextSibling;
|
||||
frag.appendChild( empty( detach( pasteArea ) ) );
|
||||
}
|
||||
|
||||
first = frag.firstChild;
|
||||
range = self._createRange(
|
||||
startContainer, startOffset, endContainer, endOffset );
|
||||
|
||||
|
|
Loading…
Reference in a new issue