[Pkg-javascript-commits] [pdf.js] 84/119: Remove no longer needed hacks that enable spacebar scrolling in Firefox (issue 3498)
David Prévot
taffit at moszumanska.debian.org
Wed May 13 21:27:44 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 10f134bcc28301d1a8b9324e9443c60d62ed99b9
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Tue Apr 21 17:11:09 2015 +0200
Remove no longer needed hacks that enable spacebar scrolling in Firefox (issue 3498)
Now that [bug 915962](https://bugzilla.mozilla.org/show_bug.cgi?id=915962) has landed, we no longer need any hacks to enable <kbd>spacebar</kbd> scrolling in Firefox.
Fixes 3498.
---
web/pdf_viewer.js | 4 ----
web/viewer.js | 16 +++-------------
2 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js
index 16315bb..517116a 100644
--- a/web/pdf_viewer.js
+++ b/web/pdf_viewer.js
@@ -622,10 +622,6 @@ var PDFViewer = (function pdfViewer() {
this.container.focus();
},
- blur: function () {
- this.container.blur();
- },
-
get isInPresentationMode() {
return this.presentationModeState === PresentationModeState.FULLSCREEN;
},
diff --git a/web/viewer.js b/web/viewer.js
index 33e11f1..5eb7a81 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -922,9 +922,6 @@ var PDFViewerApplication = {
// unless the viewer is embedded in a web page.
if (!self.isViewerEmbedded) {
self.pdfViewer.focus();
-//#if (FIREFOX || MOZCENTRAL)
-// self.pdfViewer.blur();
-//#endif
}
}, function rejected(reason) {
console.error(reason);
@@ -2169,16 +2166,9 @@ window.addEventListener('keydown', function keydown(evt) {
pdfViewer.focus();
}
// 32=Spacebar
- if (evt.keyCode === 32 && curElementTagName !== 'BUTTON') {
-//#if (FIREFOX || MOZCENTRAL)
-// // Workaround for issue in Firefox, that prevents scroll keys from
-// // working when elements with 'tabindex' are focused. (#3498)
-// pdfViewer.blur();
-//#else
- if (!pdfViewer.containsElement(curElement)) {
- pdfViewer.focus();
- }
-//#endif
+ if (evt.keyCode === 32 && curElementTagName !== 'BUTTON' &&
+ !pdfViewer.containsElement(curElement)) {
+ pdfViewer.focus();
}
}
--
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