tdf#130594: leaflet: Search bar issues

pressing Ctrl-F opens browser search resolved

pressing 'r' behaves weird resolved

Change-Id: I9c54f37267a2f34b6d0923b46dc72a6efcf04786
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89661
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
Pranam Lashkari 2020-02-28 13:49:30 +05:30 committed by Andras Timar
parent 316a011c08
commit 57cca53b6a

View file

@ -1244,7 +1244,7 @@ function initNormalToolbar() {
function setupSearchInput() {
$('#search-input').off('input', onSearchInput).on('input', onSearchInput);
$('#search-input').off('keypress', onSearchKeyPress).on('keypress', onSearchKeyPress);
$('#search-input').off('keydown', onSearchKeyDown).on('keydown', onSearchKeyDown);
$('#search-input').off('focus', onSearchFocus).on('focus', onSearchFocus);
$('#search-input').off('blur', onSearchBlur).on('blur', onSearchBlur);
}
@ -1355,7 +1355,7 @@ function onSearchInput() {
}
}
function onSearchKeyPress(e) {
function onSearchKeyDown(e) {
var entry = L.DomUtil.get('search-input');
if ((e.keyCode === 71 && e.ctrlKey) || e.keyCode === 114 || e.keyCode === 13) {
if (e.shiftKey) {