[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-1' - 2 commits - debian/changelog loleaflet/dist loleaflet/src loolwsd.spec.in

Andras Timar andras.timar at collabora.com
Thu Mar 29 17:32:53 UTC 2018


 debian/changelog                      |    6 ++++++
 loleaflet/dist/leaflet.css            |   17 +++++------------
 loleaflet/src/layer/marker/Cursor.js  |   34 +---------------------------------
 loleaflet/src/layer/tile/TileLayer.js |   23 +++++++++++------------
 loleaflet/src/map/Map.js              |   15 ++++++++++++---
 loolwsd.spec.in                       |    2 +-
 6 files changed, 36 insertions(+), 61 deletions(-)

New commits:
commit 8b9ef2165bb945f8ac88c58b3f11f0813a5534eb
Author: Andras Timar <andras.timar at collabora.com>
Date:   Thu Mar 29 19:32:29 2018 +0200

    Bump package version to 3.1.0-7
    
    Change-Id: I2d90cb1947dfdc7ec0bdb29245ca4092bcb1bde7

diff --git a/debian/changelog b/debian/changelog
index a322e6377..b0cfbad83 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+loolwsd (3.1.0-7) unstable; urgency=medium
+
+  * see the git log: http://col.la/cool31
+
+ -- Andras Timar <andras.timar at collabora.com>  Thu, 29 Mar 2018 19:30:00 +0200
+
 loolwsd (3.1.0-6) unstable; urgency=medium
 
   * see the git log: http://col.la/cool31
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index 3d42cae8e..7f789cc16 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:           loolwsd%{name_suffix}
 Name:           loolwsd
 %endif
 Version:        @PACKAGE_VERSION@
-Release:        6%{?dist}
+Release:        7%{?dist}
 %if 0%{?suse_version} == 1110
 Group:          Productivity/Office/Suite
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
commit 85af6c3d06d7e0c9a4563917dc41a186293691cf
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Mar 29 19:08:35 2018 +0530

    Revert all related loleaflet IME changes
    
    ... that can potentially affect the html/css layout. We have a problem
    in the front-end where map gets incorrectly positioned due to the moving
    candidate window. With this revert, the candidate window is thrown back
    at where it was (to the top-left) and the problem we are facing (as
    mentioned above) dissappears as well. Let's fix that problem first
    before re-revert it.
    
    This reverts commit 98b53ae956782ce7366a2d4b29e80ce31b748058.
    
    Change-Id: I2882900246efc068e514de134dc3fdd07f1ef024

diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index d1a615a50..c324ebfde 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -679,7 +679,7 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header {
 }
 
 .clipboard-container {
-	position: absolute;
+	position: fixed;
 	left: 0px;
 	top: 0px;
 	width: 0px;
@@ -688,18 +688,11 @@ div.leaflet-cursor-container:hover > .leaflet-cursor-header {
 	opacity: 0;
 	}
 
-input.clipboard {
+.clipboard {
 	width: 1px;
 	height: 1px;
-	padding: 0px !important; /* w2ui defines "input:not([type=button])" rule which sets
-				    the padding to non-zero. Hence, the !important. Otherwise,
-				    clipboard cursor apperas in MSIE and MSEdge */
-	border: 0px !important;
-}
-
-.clipboard:focus {
-    outline: none;
-}
+	padding: 0px;
+	}
 
 .resize-detector {
     position: absolute;
@@ -870,4 +863,4 @@ input.clipboard {
 	border-radius: 2px;
 	top: 24px;
 	color: white;
-	}
+	}
\ No newline at end of file
diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js
index c370aa13e..792a13485 100644
--- a/loleaflet/src/layer/marker/Cursor.js
+++ b/loleaflet/src/layer/marker/Cursor.js
@@ -16,24 +16,13 @@ L.Cursor = L.Layer.extend({
 		this._initLayout();
 	},
 
-	onAdd: function (map) {
-		this._map = map;
-
+	onAdd: function () {
 		if (!this._container) {
 			this._initLayout();
 		}
 
 		this.update();
 		this.getPane().appendChild(this._container);
-
-		if (this._textArea && !this._map._textArea) {
-			this._map._textArea = this._textArea;
-
-			L.DomEvent['off'](this._textArea, 'copy cut paste keydown keypress keyup compositionstart compositionupdate compositionend textInput', this._map._handleDOMEvent, this._map);
-			L.DomEvent['on'](this._textArea, 'copy cut paste keydown keypress keyup compositionstart compositionupdate compositionend textInput', this._map._handleDOMEvent, this._map);
-
-			this._textArea.focus();
-		}
 	},
 
 	onRemove: function () {
@@ -75,16 +64,6 @@ L.Cursor = L.Layer.extend({
 		}
 	},
 
-	show: function() {
-		L.DomUtil.setStyle(this._container, 'visibility', 'visible');
-		if (this._textArea)
-			this._textArea.focus();
-	},
-
-	hide: function() {
-		L.DomUtil.setStyle(this._container, 'visibility', 'hidden');
-	},
-
 	showCursorHeader: function() {
 		if (this._cursorHeader) {
 			L.DomUtil.setStyle(this._cursorHeader, 'visibility', 'visible');
@@ -121,17 +100,6 @@ L.Cursor = L.Layer.extend({
 		L.DomEvent
 			.disableClickPropagation(this._cursor)
 			.disableScrollPropagation(this._container);
-
-		if (this.options.clipboard) {
-			var textAreaContainer = L.DomUtil.create('div', 'clipboard-container', this._container);
-			textAreaContainer.id = 'doc-clipboard-container';
-			this._textArea = L.DomUtil.create('input', 'clipboard', textAreaContainer);
-			this._textArea.setAttribute('type', 'text');
-			this._textArea.setAttribute('autocorrect', 'off');
-			this._textArea.setAttribute('autocapitalize', 'off');
-			this._textArea.setAttribute('autocomplete', 'off');
-			this._textArea.setAttribute('spellcheck', 'false');
-		}
 	},
 
 	_setPos: function (pos) {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 4706ff1df..cc7ed0587 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -278,6 +278,8 @@ L.TileLayer = L.GridLayer.extend({
 		for (var key in this._selectionHandles) {
 			this._selectionHandles[key].on('drag dragend', this._onSelectionHandleDrag, this);
 		}
+		this._textArea = map._textArea;
+		this._textArea.focus();
 
 		map.setPermission(this.options.permission);
 
@@ -1435,18 +1437,15 @@ L.TileLayer = L.GridLayer.extend({
 			var cursorPos = this._visibleCursor.getNorthWest();
 
 			if (!this._cursorMarker) {
-				this._cursorMarker = L.cursor(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())), {blink: true, clipboard: true});
-				this._map.addLayer(this._cursorMarker);
-
-				this._textArea = this._cursorMarker._textArea;
+				this._cursorMarker = L.cursor(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())), {blink: true});
 			}
 			else {
-				this._cursorMarker.show();
 				this._cursorMarker.setLatLng(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())));
 			}
+			this._map.addLayer(this._cursorMarker);
 		}
 		else if (this._cursorMarker) {
-			this._cursorMarker.hide();
+			this._map.removeLayer(this._cursorMarker);
 			this._isCursorOverlayVisible = false;
 		}
 	},
@@ -1811,9 +1810,9 @@ L.TileLayer = L.GridLayer.extend({
 	_onCopy: function (e) {
 		e = e.originalEvent;
 		e.preventDefault();
-		if (this._textArea.value !== '') {
-			L.Compatibility.clipboardSet(e, this._textArea.value);
-			this._textArea.value = '';
+		if (this._map._docLayer._textArea.value !== '') {
+			L.Compatibility.clipboardSet(e, this._map._docLayer._textArea.value);
+			this._map._docLayer._textArea.value = '';
 		} else if (this._selectionTextContent) {
 			L.Compatibility.clipboardSet(e, this._selectionTextContent);
 
@@ -1827,9 +1826,9 @@ L.TileLayer = L.GridLayer.extend({
 	_onCut: function (e) {
 		e = e.originalEvent;
 		e.preventDefault();
-		if (this._textArea.value !== '') {
-			L.Compatibility.clipboardSet(e, this._textArea.value);
-			this._textArea.value = '';
+		if (this._map._docLayer._textArea.value !== '') {
+			L.Compatibility.clipboardSet(e, this._map._docLayer._textArea.value);
+			this._map._docLayer._textArea.value = '';
 		} else if (this._selectionTextContent) {
 			L.Compatibility.clipboardSet(e, this._selectionTextContent);
 
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 6f61d266e..10f5acfd2 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -662,9 +662,9 @@ L.Map = L.Evented.extend({
 
 	focus: function () {
 		console.debug('focus:');
-		if (this._textArea && document.activeElement !== this._textArea) {
+		if (this._docLayer && document.activeElement !== this._docLayer._textArea) {
 			console.debug('focus: focussing');
-			this._textArea.focus();
+			this._docLayer._textArea.focus();
 		}
 	},
 
@@ -692,6 +692,13 @@ L.Map = L.Evented.extend({
 			throw new Error('Map container is already initialized.');
 		}
 
+		var textAreaContainer = L.DomUtil.create('div', 'clipboard-container', container.parentElement);
+		this._textArea = L.DomUtil.create('input', 'clipboard', textAreaContainer);
+		this._textArea.setAttribute('type', 'text');
+		this._textArea.setAttribute('autocorrect', 'off');
+		this._textArea.setAttribute('autocapitalize', 'off');
+		this._textArea.setAttribute('autocomplete', 'off');
+		this._textArea.setAttribute('spellcheck', 'false');
 		this._resizeDetector = L.DomUtil.create('iframe', 'resize-detector', container);
 		this._fileDownloader = L.DomUtil.create('iframe', '', container);
 		L.DomUtil.setStyle(this._fileDownloader, 'display', 'none');
@@ -815,7 +822,8 @@ L.Map = L.Evented.extend({
 
 		L.DomEvent[onOff](this._container, 'click dblclick mousedown mouseup ' +
 			'mouseover mouseout mousemove contextmenu dragover drop ' +
-			'trplclick qdrplclick', this._handleDOMEvent, this);
+			'keydown keypress keyup trplclick qdrplclick', this._handleDOMEvent, this);
+		L.DomEvent[onOff](this._textArea, 'copy cut paste keydown keypress keyup compositionstart compositionupdate compositionend textInput', this._handleDOMEvent, this);
 
 		if (this.options.trackResize && this._resizeDetector.contentWindow) {
 			L.DomEvent[onOff](this._resizeDetector.contentWindow, 'resize', this._onResize, this);
@@ -1057,6 +1065,7 @@ L.Map = L.Evented.extend({
 		// Calling from some other place with no real 'click' event doesn't work
 		if (type === 'click') {
 			if (this._permission === 'edit') {
+				this._textArea.blur();
 				this._textArea.focus();
 			}
 


More information about the Libreoffice-commits mailing list