[Pkg-javascript-commits] [pdf.js] 07/109: Fix 'namedaction' regression that breaks the 'Find' action
David Prévot
taffit at moszumanska.debian.org
Fri Sep 25 03:04:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 76cfd106d507dfb523bcae067114517a89fb895b
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Tue Aug 4 23:07:44 2015 +0200
Fix 'namedaction' regression that breaks the 'Find' action
This regressed in https://github.com/mozilla/pdf.js/commit/0ef6212b646427604b6968b8bc3cf2d6c048f012.
---
web/viewer.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/web/viewer.js b/web/viewer.js
index f5d82b5..7d45c19 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -1591,17 +1591,20 @@ document.addEventListener('pagemode', function (evt) {
}, true);
document.addEventListener('namedaction', function (e) {
+ if (!PDFViewerApplication.initialized) {
+ return;
+ }
// Processing couple of named actions that might be useful.
// See also PDFLinkService.executeNamedAction
- var action = e.action;
+ var action = e.detail.action;
switch (action) {
case 'GoToPage':
document.getElementById('pageNumber').focus();
break;
case 'Find':
- if (!this.supportsIntegratedFind) {
- this.findBar.toggle();
+ if (!PDFViewerApplication.supportsIntegratedFind) {
+ PDFViewerApplication.findBar.toggle();
}
break;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list