loleaflet/src/map/Map.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
New commits: commit 38b97e1791eb472cd320e3b2f1560a87c43c9e0f Author: Ashod Nakashian <[email protected]> AuthorDate: Tue Mar 24 16:44:11 2020 -0400 Commit: Andras Timar <[email protected]> CommitDate: Thu Mar 26 17:57:39 2020 +0100 leaflet: reuse member functions Change-Id: I8c0c58d2ab175b271df200de2b100e61c655db5f Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91018 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Andras Timar <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91130 diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index f8522d1b8..024192295 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -874,7 +874,8 @@ L.Map = L.Evented.extend({ return this._winId; }, - // Returns true iff the document has input focus. + // Returns true iff the document has input focus, + // as opposed to a dialog, sidebar, formula bar, etc. editorHasFocus: function () { return this.getWinId() === 0; }, @@ -1403,7 +1404,7 @@ L.Map = L.Evented.extend({ _changeFocusWidget: function (dialog, winId, acceptInput) { if (!this._loaded) { return; } - this._winId = winId; + this.setWinId(winId); this._activeDialog = dialog; this._isSearching = false; @@ -1431,11 +1432,11 @@ L.Map = L.Evented.extend({ // Our browser tab got focus. _onGotFocus: function () { - if (this._winId === 0) { + if (this.editorHasFocus()) { this.fire('editorgotfocus'); } else if (this._activeDialog) { - this._activeDialog.focus(this._winId); + this._activeDialog.focus(this.getWinId()); } this._activate(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
