mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
reload popup fix
This commit is contained in:
@@ -34,13 +34,12 @@ export default class RuntimeBackground {
|
|||||||
// Reload the popup when it's opened
|
// Reload the popup when it's opened
|
||||||
this.runtime.addEventListener('popover', (event: any) => {
|
this.runtime.addEventListener('popover', (event: any) => {
|
||||||
const win: Window = event.target.contentWindow;
|
const win: Window = event.target.contentWindow;
|
||||||
const body = win.document.body;
|
const href = win.location.origin + win.location.pathname;
|
||||||
let child: Node = body.firstChild;
|
if(win.location.toString() === href) {
|
||||||
while (child) {
|
win.location.reload();
|
||||||
body.removeChild(child);
|
} else {
|
||||||
child = body.firstChild;
|
win.location.href = href;
|
||||||
}
|
}
|
||||||
win.location.reload();
|
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user