Skip to content

Commit

Permalink
Change the GoToPage Named Action to select the contents of the `pag…
Browse files Browse the repository at this point in the history
…eNumber` 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]
  • Loading branch information
Snuffleupagus committed Sep 1, 2016
1 parent 23b13d3 commit 0db76dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app.js
Expand Up @@ -1707,7 +1707,7 @@ function webViewerNamedAction(e) {
var action = e.action;
switch (action) {
case 'GoToPage':
PDFViewerApplication.appConfig.toolbar.pageNumber.focus();
PDFViewerApplication.appConfig.toolbar.pageNumber.select();
break;

case 'Find':
Expand Down

0 comments on commit 0db76dc

Please sign in to comment.