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

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 18 15:25:28 UTC 2020


 loleaflet/src/control/Control.LokDialog.js |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 498b3f6b1331d56313036154ea77a6a8064e3150
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Tue Feb 11 21:37:41 2020 -0500
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Tue Feb 18 16:25:10 2020 +0100

    leaflet: show keyboard on mobile for dialogs
    
    Change-Id: I994fc34eb7a2a5e5c6c8d56a96d3ff2fe8acac2d
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88509
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index ea5ae3127..2a8d5688a 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -407,11 +407,15 @@ L.Control.LokDialog = L.Control.extend({
 	_updateDialogCursor: function(dlgId, x, y, height) {
 		var strId = this._toStrId(dlgId);
 		var dialogCursor = L.DomUtil.get(strId + '-cursor');
+		var cursorVisible = dlgId in this._dialogs && this._dialogs[dlgId].cursorVisible;
 		L.DomUtil.setStyle(dialogCursor, 'height', height + 'px');
-		L.DomUtil.setStyle(dialogCursor, 'display', this._dialogs[dlgId].cursorVisible ? 'block' : 'none');
+		L.DomUtil.setStyle(dialogCursor, 'display', cursorVisible ? 'block' : 'none');
 		// set the position of the cursor container element
 		L.DomUtil.setStyle(this._dialogs[dlgId].cursor, 'left', x + 'px');
 		L.DomUtil.setStyle(this._dialogs[dlgId].cursor, 'top', y + 'px');
+
+		// Make sure the keyboard is visible if the user can type.
+		this._map.focus(cursorVisible);
 	},
 
 	_createDialogCursor: function(dialogId) {


More information about the Libreoffice-commits mailing list