Michael Meeks
cfe70a16c0
clipboard: centralize events, and have a persistent clipboard div.
...
Change-Id: I94388e144a4a54d98b86c91675e89be932c3502a
2019-08-06 14:50:51 -04:00
Michael Meeks
1508b2da6d
clipboard: don't encode empty string as a blob: mends image paste.
...
Change-Id: I265014ad1186d21aeb8628d8cc124d4d4d3ef91f
2019-08-06 14:50:51 -04:00
Michael Meeks
1e759e4d10
Handle undefined context menu items.
...
Change-Id: I98727decc5ad7fe2525a2d28f140fa3a39927e5b
2019-08-06 14:50:51 -04:00
Michael Meeks
dd65c20f12
Context menus: stop items looking too much like links.
...
Change-Id: I9bd469070ba401c97da3547e9d1aaa2ccb83f155
2019-08-06 14:50:51 -04:00
Michael Meeks
90c73cbf54
clipboard: Improve selection management.
...
Change-Id: I3b6318f9a0cc544b74564376426baf7d3759ee3e
2019-08-06 14:50:51 -04:00
Michael Meeks
c4f36953c4
Switch to using beforecopy etc. to setup the selection.
...
Change-Id: I432bcdaeba84eaac8925673f4d6b33a0d10f0a97
2019-08-06 14:50:51 -04:00
Michael Meeks
23d748947c
clipboard: use <a href='#' and click overriding to get copy/paste on iOS
...
Since context click vs. mouse-up is a global, we have to do all our
contexts.
Change-Id: Ie50a832d1b9df066cfccc2138f0741f8d407a1a4
2019-08-06 14:50:51 -04:00
Michael Meeks
8956a8f203
Avoid harmful stopHideDownload while populating the clipboard.
...
Change-Id: I1e3dec1d76f204fca84dc4a0d53f4ac02175288a
2019-08-06 14:50:51 -04:00
Michael Meeks
da7790db46
Separate exception handling for iOS and Android postmessages.
...
Change-Id: I618123dab29fb0e24f92b1bf7fb4bfa76e1dd709
2019-08-06 14:50:51 -04:00
Ashod Nakashian
b9674d51cd
leaflet: Improve handling of paste without source document
...
Improve on handling paste without download and
handles onerror properly, which invokes the error
handler callback (where provided) where previously
it was ignored.
Change-Id: I3b527516dc4f90484fd1cfba411b45ff948ffc53
2019-08-06 14:50:51 -04:00
Ashod Nakashian
9a0bb531eb
wsd: Logging corrections
...
Change-Id: Ib4472c203d29992f08966a78961ab364e589f8d0
2019-08-05 22:21:54 -04:00
Ashod Nakashian
d12227c839
wsd: send clipboard key on loading
...
While we don't send the clipboard key
to the client during the construction
of ClientSession, we do so upon handshake
(loolclient message), and by then our state
is no longer DETACHED, rather it is LOADING.
This restores copy/paste across documents.
Change-Id: I0db50210f232afa05b1273edeb2cc163fd07c504
2019-08-05 22:21:54 -04:00
Michael Meeks
9e791fb0d4
clipboard: persist selections for a while after a view closes.
...
re-factor ClientSession state to be a simpler state machine.
Have a nice disconnect / disconnected handshake on view close.
Change-Id: Ie933cc5c7dfab46c66f4d38a4d75c459aa1cff87
2019-08-05 22:21:54 -04:00
Ashod Nakashian
2492faf225
wsd: add 'meta origin' to clipboardcontent payloads too
...
Change-Id: I61233fd9b2559a28a0da67dd0a869e97c8b34da7
2019-08-05 21:58:10 -04:00
Ashod Nakashian
fae1a967db
leaflet: catch exceptions form paste postMessage
...
Change-Id: I06676f0ebdf798db095ea6d70e84907e5c318ac4
2019-08-05 21:58:03 -04:00
Michael Meeks
710ce605c8
clipboard: IE11 rich paste works.
...
Change-Id: Ifa05aa0cf5e84f4ccd5414f45857aee34aa05f1c
2019-08-05 21:57:09 -04:00
Michael Meeks
98d120d19b
This to that.
...
Change-Id: Ic690751e42b0f906db7b327d5d8082028ef492dd
2019-08-05 21:57:03 -04:00
Michael Meeks
3fd1423a29
clipboard: get image paste working for Edge.
...
Change-Id: I35c12e094e16f966f1be9c631c6d7023954504f0
2019-08-05 21:56:58 -04:00
Michael Meeks
6fbb3fef36
clipboard: ensure image fallback works for paste.
...
Don't return an empty blob for no textual content case.
Change-Id: I592d0e7f876b7ecbe86f769cbb7fdd4a2183531b
2019-08-05 21:56:53 -04:00
Michael Meeks
23db67341c
IE11 - get copy/paste happy again.
...
Change-Id: I42a74a04a6f3f3fb7eff617a2003084174108464
2019-08-05 21:55:01 -04:00
Michael Meeks
5f27b235e3
Fix this to that.
...
Change-Id: I978092973244ac80cdf68ed539f30c3272b6a615
2019-08-05 21:53:19 -04:00
Michael Meeks
326391325e
clipboard: having downloaded the complex selection, don't do it again.
...
Instead use the result.
Change-Id: Ife2093d6d69c2598079fee7a543044378e2b6829
2019-08-05 21:53:11 -04:00
Michael Meeks
7f43d5d385
Use isComplex for calc too.
...
Change-Id: Ib209cca53079cb9d63a8955caf80945c7ea455d4
2019-08-05 21:53:06 -04:00
Michael Meeks
bc9ea43af1
Don't let the clipboard 'Download' button linger around continually.
...
NB. can't use text-selection as a trigger to hide it, but use another
copy/cut/paste etc.
Change-Id: Iebf07a2fb8900b71134fcdac011336d87ab01e6a
2019-08-05 21:53:01 -04:00
Szymon Kłos
869248929c
Allow paste from external clipboard in dialogs
...
Change-Id: Ife7a32ada356a3a594bdd314ff5a0a4b7d10eb50
2019-08-05 21:52:41 -04:00
Michael Meeks
181af63b56
Attempt to use a RichDocuments postmessage for paste before giving up.
...
Change-Id: I62b8a7d0a4ed9612f42f0e4a3acb75e52ab32c97
2019-08-05 21:49:33 -04:00
Ashod Nakashian
b57f6474dd
leaflet: graphics are always complex
...
Change-Id: I56c5c185c3eeb50ce3c4674dbddce217982cb40a
2019-08-05 21:49:13 -04:00
Marco Cecchetti
1eabf060a5
loleaflet: fix downloadprogress issue for cross copy-paste
...
Change-Id: If9e76d6c477da773913ee18ef33349c42a3d7ff0
2019-08-05 21:47:23 -04:00
Michael Meeks
229b0288da
Tweak strings before translation.
...
Change-Id: I3f9817af6439518dff63731fed720e0cf60135ef
2019-08-05 21:47:19 -04:00
Marco Cecchetti
8621eb993b
loleaflet: warning about large copy paste remove username check
...
Change-Id: I5a6fffbe20883b30617242765a687de02c55d2d7
2019-08-05 21:47:13 -04:00
Marco Cecchetti
2dffb37318
loleaflet: DownloadProgress avoid circular issue with _doAsyncDownload
...
Change-Id: I94364258e83e77dbb49dfb4b2d891b18141529a5
2019-08-05 21:47:08 -04:00
Michael Meeks
7cb3b634ad
clipboard: we still need to detect single graphic selections.
...
graphic selections are automagically 'too big'.
Change-Id: Idc8baa17257eff01a6bcae958bffbbcfeea6138c
2019-08-05 21:47:00 -04:00
Marco Cecchetti
1ffefd87f2
loleaflet: fixed minor issues
...
Change-Id: Ia22688b6a577ee4d8da6d1c11870db8a2aaf95d1
2019-08-05 21:46:55 -04:00
Michael Meeks
b8640e4be1
clipboard: text-fallback should not include random style content.
...
Change-Id: I7addad84cfa68eaf6a4493cc00046b497abda9f9
2019-08-05 21:46:50 -04:00
Michael Meeks
eeff5ee173
clipboard: include /lool/ into the clipboard base URL.
...
Helps older load-balancers.
Change-Id: Ibc1529a5784bb7fe6e11f914f4ee01cd1bae52a2
2019-08-05 21:46:39 -04:00
Ashod Nakashian
8ce397b758
clipboard: Copying of complex data with detection
...
Complex data is now flagged based on Core's
feedback and/or the size of the payload.
Download now works as expected and copying
to the clipboard is also functional.
Change-Id: I7405517e3a6afcc4c8f5843130476578c1ff06f6
2019-08-05 21:46:31 -04:00
Michael Meeks
00a4fc0cd7
clipboard: good places to dump the raw byte stream.
...
Change-Id: Idb81bd9f1e090ad337c3f98c03c4fd79f7da51a6
2019-08-05 21:44:54 -04:00
Michael Meeks
cec522e4a1
clipboard: get blob / text conversion size arithmetic right.
...
I don't even want to think about DOMStrings with binary clipboard
data creating random UTF16 code-points and ... so use Blob([]) to
help make that sensible.
Change-Id: I9854bd203763c102be4046f168bc89e80b62aa07
2019-08-05 21:44:47 -04:00
Ashod Nakashian
cd3294a663
leaflet: more forgiving when double copying
...
The "download already started" dialog can be
distracting. Let's disable for now and consider
replating with something like flashing the
download widget.
Change-Id: I992078ba1713e25b7576bb85266f79d31eb7556e
2019-08-05 21:44:42 -04:00
Michael Meeks
0fd20b0cb5
Fix paste method name.
...
Change-Id: If0c1d8d388c9228fc5b65a65566cb519f8578fe1
2019-08-05 21:44:36 -04:00
Michael Meeks
fbd021958b
clipboard: de-combine whole clipboard fetch from just text/html.
...
Now we can copy/paste smileys internally again.
Change-Id: Ibc6c77ccb9c501230947a7172cf591b2e12531b3
2019-08-05 21:44:29 -04:00
Michael Meeks
83fff92637
clipboard: cleanup IE11 pieces, and dataTransfer API.
...
Change-Id: Ief3c293f123cf5ac3c82ed9de4c268129b1fff13
2019-08-05 21:43:44 -04:00
Michael Meeks
e587562226
clipboard: null terminate the mime-type array.
...
Change-Id: I7d120c22bc95414c51639271abaebd5538551463
2019-08-05 21:42:50 -04:00
Michael Meeks
6e3bc36a0e
Prune clipboard bits from ClipboardContainer -> Clipboard.js
...
Change-Id: Ia02ebd675c60a1efa4c061e8872452c4d5f952db
2019-08-05 21:41:51 -04:00
Michael Meeks
0607899d05
clipboard: Use the 'map' as our temporary parent - helps Safari.
...
Change-Id: I08b45b59ddb1856274cf0fd67d34d3d7ccab3b15
2019-08-05 21:39:05 -04:00
Szymon Kłos
18305c8a44
Request text/html in get clipboard
...
Change-Id: I9096fb2470da0255722f58bdeaeba87fcae3511d
2019-08-05 21:38:01 -04:00
Szymon Kłos
d3208f9cfe
Download complex content
...
Clipboard not set yet
Change-Id: Ic70c7b791d1248309ef4155c47da03e776ce00ec
2019-08-05 21:38:01 -04:00
Michael Meeks
729d95ec61
clipboard: use captive contenteditable to enable copy/cut on Safari.
...
Change-Id: Ifa3afc6e3257886beaffb20180f343dec6c41cd5
2019-08-05 21:36:49 -04:00
Marco Cecchetti
69fdd49db9
loleaflet: warning about large copy/paste only once
...
Change-Id: Ia957389b0a1ec242374398e1d555ebc4d3a6b2d8
2019-08-05 21:36:49 -04:00
Szymon Kłos
c564af1614
Paste text/html in IE
...
Change-Id: I9e9b400d9894e2689b86aaca8d0f66bf1f364b0e
2019-08-05 21:36:49 -04:00