mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Workaround Facebook iOS URL copying bug
This commit is contained in:
parent
44a2b5c7a8
commit
e3d0576a38
3 changed files with 13 additions and 5 deletions
|
@ -2136,10 +2136,14 @@ var onPaste = function ( event ) {
|
|||
event.preventDefault();
|
||||
// Abiword on Linux copies a plain text and html version, but the HTML
|
||||
// version is the empty string! So always try to get HTML, but if none,
|
||||
// insert plain text instead.
|
||||
// insert plain text instead. On iOS, Facebook (and possibly other
|
||||
// apps?) copy links as type text/uri-list, but also insert a **blank**
|
||||
// text/plain item onto the clipboard. Why? Who knows.
|
||||
if (( data = clipboardData.getData( 'text/html' ) )) {
|
||||
this.insertHTML( data, true );
|
||||
} else if (( data = clipboardData.getData( 'text/plain' ) )) {
|
||||
} else if (
|
||||
( data = clipboardData.getData( 'text/plain' ) ) ||
|
||||
( data = clipboardData.getData( 'text/uri-list' ) ) ) {
|
||||
this.insertPlainText( data, true );
|
||||
}
|
||||
return;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -131,10 +131,14 @@ var onPaste = function ( event ) {
|
|||
event.preventDefault();
|
||||
// Abiword on Linux copies a plain text and html version, but the HTML
|
||||
// version is the empty string! So always try to get HTML, but if none,
|
||||
// insert plain text instead.
|
||||
// insert plain text instead. On iOS, Facebook (and possibly other
|
||||
// apps?) copy links as type text/uri-list, but also insert a **blank**
|
||||
// text/plain item onto the clipboard. Why? Who knows.
|
||||
if (( data = clipboardData.getData( 'text/html' ) )) {
|
||||
this.insertHTML( data, true );
|
||||
} else if (( data = clipboardData.getData( 'text/plain' ) )) {
|
||||
} else if (
|
||||
( data = clipboardData.getData( 'text/plain' ) ) ||
|
||||
( data = clipboardData.getData( 'text/uri-list' ) ) ) {
|
||||
this.insertPlainText( data, true );
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue