Ensure that the viewer always receives focus when the HOME/END keys are pressed (bug 1186842)
It appears that I broke this with PR 4941. Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1186842.
This commit is contained in:
parent
862342189f
commit
d5232f5b5a
@ -1993,6 +1993,9 @@ window.addEventListener('keydown', function keydown(evt) {
|
||||
if (isViewerInPresentationMode || PDFViewerApplication.page > 1) {
|
||||
PDFViewerApplication.page = 1;
|
||||
handled = true;
|
||||
if (!pdfViewer.containsElement(curElement)) {
|
||||
pdfViewer.focus();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 35: // end
|
||||
@ -2000,6 +2003,9 @@ window.addEventListener('keydown', function keydown(evt) {
|
||||
PDFViewerApplication.page < PDFViewerApplication.pagesCount)) {
|
||||
PDFViewerApplication.page = PDFViewerApplication.pagesCount;
|
||||
handled = true;
|
||||
if (!pdfViewer.containsElement(curElement)) {
|
||||
pdfViewer.focus();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user