Pull request #121: Clear search results on search panel close
Merge in RED/ui from RED-1130 to master * commit '886f253fa15ef2f95a9dfc2033256725b7bc5660': Clear search results on search panel close
This commit is contained in:
commit
b13704634b
@ -150,6 +150,18 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
|
||||
}
|
||||
});
|
||||
|
||||
instance.iframeWindow.addEventListener('visibilityChanged', (event: any) => {
|
||||
if (event.detail.element === 'searchPanel') {
|
||||
const inputElement = instance.iframeWindow.document.getElementById('SearchPanel__input') as HTMLInputElement;
|
||||
setTimeout(() => {
|
||||
inputElement.value = '';
|
||||
}, 0);
|
||||
if (!event.detail.isVisible) {
|
||||
instance.docViewer.clearSearchResults();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this._loadDocument();
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user