Skip to content

Commit

Permalink
Don't trigger searching, in the GENERIC viewer, when <kbd>Shift</kb…
Browse files Browse the repository at this point in the history
…d> 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 <kbd>Ctrl</kbd>+<kbd>F</kbd> (or <kbd>command</kbd>+<kbd>F</kbd> on Mac), but <kbd>Shift</kbd> 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 <kbd>command</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd> shortcut is even reserved for the "Toggle Full Screen" functionality on Mac.
  • Loading branch information
Snuffleupagus committed Sep 29, 2020
1 parent 6728c8f commit f399ac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f399ac7

Please sign in to comment.