From 0db76dc58c3bc096fd49595f46697233c7bb6589 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 1 Sep 2016 13:23:18 +0200 Subject: [PATCH] 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 Ctrl+Alt+G, 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] --- web/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index b38fc6ec3..d309cb80b 100644 --- a/web/app.js +++ b/web/app.js @@ -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':