leaflet: maintain focus when searching

When the focus is in the search box, we shouldn't
lose it, or hide the keyboard.

Change-Id: I05c4c3e384d840b2919106af1063978b6fe7fbfe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91580
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2020-04-02 08:09:28 -04:00 committed by Ashod Nakashian
parent f96126fb69
commit 04b0a7b651

View file

@ -2184,7 +2184,8 @@ L.TileLayer = L.GridLayer.extend({
}
} else {
this._map._textInput.hideCursor();
if (this._map.editorHasFocus()) // Allow input if a dialog has the focus.
// Maintain input if a dialog or search-box has the focus.
if (this._map.editorHasFocus() && !this._map.isSearching())
this._map.focus(false);
}
},