loleaflet/src/control/Control.LokDialog.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit b97592ee5ea537684f51a1ce43911963f939a838 Author: Ashod Nakashian <[email protected]> AuthorDate: Tue Feb 25 19:27:14 2020 -0500 Commit: Jan Holesovsky <[email protected]> CommitDate: Wed Feb 26 12:59:46 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 <[email protected]> Reviewed-by: Ashod Nakashian <[email protected]> (cherry picked from commit 16f1c624ea7070748d1ef05acd8f448b9af14419) Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89512 Reviewed-by: Jan Holesovsky <[email protected]> Tested-by: Jan Holesovsky <[email protected]> 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
