From 57cca53b6a5bafad841c16cfcf078a1846f12ecb Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Fri, 28 Feb 2020 13:49:30 +0530 Subject: [PATCH] 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 Reviewed-by: Andras Timar --- loleaflet/src/control/Control.Toolbar.js | 4 ++-- 1 file 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) {