[Libreoffice-commits] online.git: loleaflet/src
merttumer (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 14 14:03:08 UTC 2019
loleaflet/src/control/Control.Toolbar.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 92f5d7407341b4eeda4ccf5c9c2c83661313e3b3
Author: merttumer <mert.tumer at collabora.com>
AuthorDate: Mon Jun 3 14:20:50 2019 +0300
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Nov 14 15:02:51 2019 +0100
Make pressing Ctrl+F twice behave like Desktop
Currently pressing Ctrl+F twice opens up browsers
search bar.
Signed-off-by: merttumer <mert.tumer at collabora.com>
Change-Id: I213d4e4c770a035714abe7bcd0e54c74929ade27
Reviewed-on: https://gerrit.libreoffice.org/82694
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 4abc14d62..faa3e0f6f 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1223,13 +1223,18 @@ function onSearch() {
}
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) {
- map.search(L.DomUtil.get('search-input').value, true);
+ map.search(entry.value, true);
} else {
- map.search(L.DomUtil.get('search-input').value);
+ map.search(entry.value);
}
e.preventDefault();
+ } else if (e.ctrlKey && e.keyCode === 70) {
+ entry.focus();
+ entry.select();
+ e.originalEvent.preventDefault();
} else if (e.keyCode === 27) {
_cancelSearch();
}
More information about the Libreoffice-commits
mailing list