summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2020-02-28 13:49:30 +0530
committerAndras Timar <andras.timar@collabora.com>2020-03-12 16:21:21 +0100
commit57cca53b6a5bafad841c16cfcf078a1846f12ecb (patch)
tree602b7bb181c0d49ca1837578bbd23d36663f3d25
parent316a011c08ddf1c7dd6a329f04c238bd2c040eb5 (diff)
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>
-rw-r--r--loleaflet/src/control/Control.Toolbar.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 54967a7bd..a26a63304 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -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) {