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();
|
this.container.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
blur: function () {
|
|
||||||
this.container.blur();
|
|
||||||
},
|
|
||||||
|
|
||||||
get isInPresentationMode() {
|
get isInPresentationMode() {
|
||||||
return this.presentationModeState === PresentationModeState.FULLSCREEN;
|
return this.presentationModeState === PresentationModeState.FULLSCREEN;
|
||||||
},
|
},
|
||||||
|
@ -922,9 +922,6 @@ var PDFViewerApplication = {
|
|||||||
// unless the viewer is embedded in a web page.
|
// unless the viewer is embedded in a web page.
|
||||||
if (!self.isViewerEmbedded) {
|
if (!self.isViewerEmbedded) {
|
||||||
self.pdfViewer.focus();
|
self.pdfViewer.focus();
|
||||||
//#if (FIREFOX || MOZCENTRAL)
|
|
||||||
// self.pdfViewer.blur();
|
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
}, function rejected(reason) {
|
}, function rejected(reason) {
|
||||||
console.error(reason);
|
console.error(reason);
|
||||||
@ -2169,16 +2166,9 @@ window.addEventListener('keydown', function keydown(evt) {
|
|||||||
pdfViewer.focus();
|
pdfViewer.focus();
|
||||||
}
|
}
|
||||||
// 32=Spacebar
|
// 32=Spacebar
|
||||||
if (evt.keyCode === 32 && curElementTagName !== 'BUTTON') {
|
if (evt.keyCode === 32 && curElementTagName !== 'BUTTON' &&
|
||||||
//#if (FIREFOX || MOZCENTRAL)
|
!pdfViewer.containsElement(curElement)) {
|
||||||
// // Workaround for issue in Firefox, that prevents scroll keys from
|
pdfViewer.focus();
|
||||||
// // working when elements with 'tabindex' are focused. (#3498)
|
|
||||||
// pdfViewer.blur();
|
|
||||||
//#else
|
|
||||||
if (!pdfViewer.containsElement(curElement)) {
|
|
||||||
pdfViewer.focus();
|
|
||||||
}
|
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user