Fix 'namedaction' regression that breaks the 'Find' action
This regressed in 0ef6212b64
.
This commit is contained in:
parent
5c26e5e2cd
commit
76cfd106d5
@ -1591,17 +1591,20 @@ document.addEventListener('pagemode', function (evt) {
|
|||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
document.addEventListener('namedaction', function (e) {
|
document.addEventListener('namedaction', function (e) {
|
||||||
|
if (!PDFViewerApplication.initialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Processing couple of named actions that might be useful.
|
// Processing couple of named actions that might be useful.
|
||||||
// See also PDFLinkService.executeNamedAction
|
// See also PDFLinkService.executeNamedAction
|
||||||
var action = e.action;
|
var action = e.detail.action;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'GoToPage':
|
case 'GoToPage':
|
||||||
document.getElementById('pageNumber').focus();
|
document.getElementById('pageNumber').focus();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Find':
|
case 'Find':
|
||||||
if (!this.supportsIntegratedFind) {
|
if (!PDFViewerApplication.supportsIntegratedFind) {
|
||||||
this.findBar.toggle();
|
PDFViewerApplication.findBar.toggle();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user