Potential fix for preview bar disappearing sometimes

This commit is contained in:
Ajay 2023-05-24 23:43:41 -04:00
parent 6585a4e325
commit a83e83c1b1

View file

@ -1320,6 +1320,13 @@ function videoElementChange(newVideo: boolean): void {
setupCategoryPill();
}
checkPreviewbarState();
// Incase the page is still transitioning, check again in a few seconds
setTimeout(checkPreviewbarState, 5000);
}
function checkPreviewbarState(): void {
if (previewBar && !utils.findReferenceNode()?.contains(previewBar.container)) {
previewBar.remove();
previewBar = null;