loleaflet/src/control/Control.LokDialog.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 16f1c624ea7070748d1ef05acd8f448b9af14419 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Tue Feb 25 19:27:14 2020 -0500 Commit: Ashod Nakashian <ashnak...@gmail.com> CommitDate: Wed Feb 26 01:35:30 2020 +0100 leaflet: don't lose focus when the dialog cursor is hiden The cursor visibility can change rapidly, and the formula-bar seems to do this when typing into it. The result is that because of losing the input focus we lose some of the input. Instead, we only use the dialog cursor update to show the keyboard rather than to hide it. For hiding, other messages will do it. Change-Id: I0e8674170aa9d05b6ddc15de8d35792377b6725b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89490 Tested-by: Ashod Nakashian <ashnak...@gmail.com> Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 2a8d5688a..d106b1504 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -414,8 +414,11 @@ L.Control.LokDialog = L.Control.extend({ 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); + // Make sure the keyboard is visible if there is a cursor. + // But don't hide the keyboard otherwise. + // At least the formula-input hides the cursor after each key input. + if (cursorVisible) + this._map.focus(true); }, _createDialogCursor: function(dialogId) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits