From 72f48ee089c57a8c19a17834f24cc73f23ea2ff4 Mon Sep 17 00:00:00 2001 From: DesWurstes Date: Thu, 20 Aug 2020 09:28:02 +0100 Subject: [PATCH] Return the query with the findcontrols --- web/app.js | 8 +++++++- web/pdf_find_controller.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index 1b27611b2..a486e02cd 100644 --- a/web/app.js +++ b/web/app.js @@ -2438,12 +2438,18 @@ function webViewerUpdateFindMatchesCount({ matchesCount }) { } } -function webViewerUpdateFindControlState({ state, previous, matchesCount }) { +function webViewerUpdateFindControlState({ + state, + previous, + matchesCount, + rawQuery, +}) { if (PDFViewerApplication.supportsIntegratedFind) { PDFViewerApplication.externalServices.updateFindControlState({ result: state, findPrevious: previous, matchesCount, + rawQuery, }); } else { PDFViewerApplication.findBar.updateUIState(state, previous, matchesCount); diff --git a/web/pdf_find_controller.js b/web/pdf_find_controller.js index 36f4e042a..a306b7e84 100644 --- a/web/pdf_find_controller.js +++ b/web/pdf_find_controller.js @@ -736,6 +736,7 @@ class PDFFindController { state, previous, matchesCount: this._requestMatchesCount(), + rawQuery: this._state ? this._state.query : null, }); } }