Populate the find field with the search query when URL has #search hash

These changes improves the existing search functionality triggered when
the URL contains a `#search` hash.

In addition to performing the actual search immediately like before,
this will ensure the search text field inside the find bar gets
populated with the text currently being searched for.
This commit is contained in:
Phillip Johnsen 2020-07-30 09:53:38 +02:00
parent eb4d6a0652
commit 50f73092e1

View File

@ -2349,6 +2349,10 @@ function webViewerFindFromUrlHash(evt) {
highlightAll: true,
findPrevious: false,
});
if (PDFViewerApplication.findBar) {
PDFViewerApplication.findBar.findField.value = evt.query;
}
}
function webViewerUpdateFindMatchesCount({ matchesCount }) {