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.
This commit is contained in:
parent
71ab5e5ac5
commit
10f134bcc2
@ -622,10 +622,6 @@ var PDFViewer = (function pdfViewer() {
|
||||
this.container.focus();
|
||||
},
|
||||
|
||||
blur: function () {
|
||||
this.container.blur();
|
||||
},
|
||||
|
||||
get isInPresentationMode() {
|
||||
return this.presentationModeState === PresentationModeState.FULLSCREEN;
|
||||
},
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user