Browse Source

Change the `GoToPage` Named Action to select the contents of the `pageNumber` input, rather than just focusing the element

When clicking on the `pageNumber` input, or when using the keyboard shortcut <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>G</kbd>, the element isn't just focused but its contents is actually *selected* so that the user doesn't need to clear the input before entering a new `pageNumber`.
However, the `GoToPage` named action is only using `focus`, so let's change this to be consistent.

The following document can be used for testing: http://www2.informatik.uni-freiburg.de/~frank/ENG/beamer/example/Beamer-class-example1.pdf#zoom=page-fit

[screeenshot]
Jonas Jenwald 9 years ago
parent
commit
0db76dc58c
  1. 2
      web/app.js

2
web/app.js

@ -1707,7 +1707,7 @@ function webViewerNamedAction(e) {
var action = e.action; var action = e.action;
switch (action) { switch (action) {
case 'GoToPage': case 'GoToPage':
PDFViewerApplication.appConfig.toolbar.pageNumber.focus(); PDFViewerApplication.appConfig.toolbar.pageNumber.select();
break; break;
case 'Find': case 'Find':

Loading…
Cancel
Save