RED-9083: prevent search panel from re-opening unexpectedly.

This commit is contained in:
Nicoleta Panaghiu 2024-04-30 12:44:34 +03:00
parent 478a661ca4
commit 4ecd8f34dd

View File

@ -327,15 +327,8 @@ export class PdfViewer {
return;
}
const inputElement = iframeWindow.document.getElementById('SearchPanel__input') as HTMLInputElement;
if (inputElement) {
setTimeout(() => (inputElement.value = ''), 0);
}
if (!event.detail.isVisible) {
this.documentViewer.clearSearchResults();
}
const clearSearchButton = iframeWindow.document.getElementsByClassName('clearSearch-button')[0] as HTMLButtonElement;
clearSearchButton?.click();
});
}