From f399ac7f16df28d59c2d6391b2e4a70adb1fa529 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 29 Sep 2020 10:37:33 +0200 Subject: [PATCH] Don't trigger searching, in the `GENERIC` viewer, when Shift is used together with the regular keyboard shortcut (issue 12421) Please note that this change won't affect the Firefox built-in PDF Viewer, since it uses the native browser findbar. However, it brings the `GENERIC` viewer inline with how searching is normally triggered in browsers. Note that in Firefox searching is only triggered by Ctrl+F (or command+F on Mac), but Shift isn't used; see https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_search Furthermore, looking at the "Miscellaneous" section of https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#firefox:mac:fx81 the command+Shift+F shortcut is even reserved for the "Toggle Full Screen" functionality on Mac. --- web/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index fa9070834996e..7f368f758cb58 100644 --- a/web/app.js +++ b/web/app.js @@ -2714,7 +2714,7 @@ function webViewerKeyDown(evt) { // either CTRL or META key with optional SHIFT. switch (evt.keyCode) { case 70: // f - if (!PDFViewerApplication.supportsIntegratedFind) { + if (!PDFViewerApplication.supportsIntegratedFind && !evt.shiftKey) { PDFViewerApplication.findBar.open(); handled = true; }