[Libreoffice-commits] online.git: loleaflet/src
Tamás Zolnai (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 20 11:38:58 UTC 2019
loleaflet/src/control/Control.LokDialog.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit d1477ca9851bcee527c8c50f8a839bec7e050938
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Aug 20 12:44:57 2019 +0200
Commit: Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Aug 20 13:38:39 2019 +0200
Dialogs: controls without cursor should not pop-up keyboard
when selected on mobile.
Change-Id: Iee34ad4a878bacea1e11e754b41bf86734796b27
Reviewed-on: https://gerrit.libreoffice.org/77803
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 3c29f3437..391f61490 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -361,7 +361,10 @@ L.Control.LokDialog = L.Control.extend({
if (!this._isOpen(dlgId) || !this._dialogs[dlgId].input)
return;
- this._dialogs[dlgId].input.focus();
+ if (this._dialogs[dlgId].cursorVisible)
+ this._dialogs[dlgId].input.focus();
+ else
+ this._dialogs[dlgId].input.blur();
},
_setCanvasWidthHeight: function(canvas, width, height) {
@@ -474,7 +477,7 @@ L.Control.LokDialog = L.Control.extend({
// 'mousedown' -> 'buttondown'
var lokEventType = e.type.replace('mouse', 'button');
this._postWindowMouseEvent(lokEventType, id, e.offsetX, e.offsetY, 1, buttons, 0);
- dlgInput.focus();
+ this.focus(id);
}, this);
L.DomEvent.on(dlgInput,
'keyup keypress keydown compositionstart compositionupdate compositionend textInput',
More information about the Libreoffice-commits
mailing list