[Libreoffice-commits] online.git: loleaflet/src
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 6 20:18:59 UTC 2020
loleaflet/src/layer/tile/TileLayer.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 9b9f2d0c041ad8d458a0c954c0de8af3a4840488
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Tue Feb 4 21:58:30 2020 -0500
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Feb 6 21:18:40 2020 +0100
leaflet: don't show the keyboard when mobile wizard open
Change-Id: I998f4d06e95eac83b21fce60f1b18f3f563522ad
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88016
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index d3c012bcd..7c111b603 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2085,16 +2085,22 @@ L.TileLayer = L.GridLayer.extend({
this._map.latLngToLayerPoint(this._visibleCursor.getNorthEast()));
var cursorPos = this._visibleCursor.getNorthWest();
+ var updated = true;
if (!this._cursorMarker) {
this._cursorMarker = L.cursor(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())), {blink: true});
}
else {
+ var oldLatLng = this._cursorMarker.getLatLng();
this._cursorMarker.setLatLng(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())));
+ var newLatLng = this._cursorMarker.getLatLng();
+ updated = !newLatLng.equals(oldLatLng);
}
this._map._textInput.showCursor();
- if (this._map.editorHasFocus() /* && !L.Browser.mobile */) {
- // User is editing, show the keyboard.
+
+ if (!window.mobileWizard && updated && this._map.editorHasFocus()) {
+ // If the user is editing, show the keyboard, but don't change
+ // anything if nothing is changed, or the wizard is visible.
this._map.focus(true);
}
},
More information about the Libreoffice-commits
mailing list