[Libreoffice-commits] online.git: loleaflet/src

Henry Castro hcastro at collabora.com
Mon Feb 19 19:47:35 UTC 2018


 loleaflet/src/layer/tile/TileLayer.js |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit c0119f51add745d9aad9ac24b1689bc4b0d4852b
Author: Henry Castro <hcastro at collabora.com>
Date:   Mon Feb 19 15:38:28 2018 -0400

    loleaflet: transfer to clipboard if the range of html is selected
    
    Change-Id: I6e804dcd3114596fb0041943b53cf00442af428d

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 93ac3cd7..8cafab6b 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1914,8 +1914,7 @@ L.TileLayer = L.GridLayer.extend({
 		if (this._map._docLayer._textArea.value !== '') {
 			L.Compatibility.clipboardSet(e, this._map._docLayer._textArea.value);
 			this._map._docLayer._textArea.value = '';
-		}
-		if (this._textSelectionStart && this._textSelectionEnd && this._selectionTextContent) {
+		} else if (this._selectionTextContent) {
 			L.Compatibility.clipboardSet(e, this._selectionTextContent);
 
 			// remember the copied text, for rich copy/paste inside a document
@@ -1931,8 +1930,7 @@ L.TileLayer = L.GridLayer.extend({
 		if (this._map._docLayer._textArea.value !== '') {
 			L.Compatibility.clipboardSet(e, this._map._docLayer._textArea.value);
 			this._map._docLayer._textArea.value = '';
-		}
-		if (this._textSelectionStart && this._textSelectionEnd && this._selectionTextContent) {
+		} else if (this._selectionTextContent) {
 			L.Compatibility.clipboardSet(e, this._selectionTextContent);
 
 			// remember the copied text, for rich copy/paste inside a document


More information about the Libreoffice-commits mailing list