mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-09 19:28:06 +01:00
[PM-5189] Fixing a weird side issue that appears when a frame within the page triggers a reposition after the inline menu has been built
This commit is contained in:
parent
9fe7c2f643
commit
67db794eda
@ -343,23 +343,21 @@ export class OverlayBackground implements OverlayBackgroundInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
const subFrameOffsetsForTab = this.subFrameOffsetsForTab[sender.tab.id];
|
||||
if (!subFrameOffsetsForTab) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.updateInlineMenuPositionTimeout) {
|
||||
clearTimeout(this.updateInlineMenuPositionTimeout);
|
||||
}
|
||||
|
||||
const tabFrameIds = Array.from(subFrameOffsetsForTab.keys());
|
||||
for (const frameId of tabFrameIds) {
|
||||
if (frameId === sender.frameId) {
|
||||
continue;
|
||||
}
|
||||
const subFrameOffsetsForTab = this.subFrameOffsetsForTab[sender.tab.id];
|
||||
if (subFrameOffsetsForTab) {
|
||||
const tabFrameIds = Array.from(subFrameOffsetsForTab.keys());
|
||||
for (const frameId of tabFrameIds) {
|
||||
if (frameId === sender.frameId) {
|
||||
continue;
|
||||
}
|
||||
|
||||
subFrameOffsetsForTab.delete(frameId);
|
||||
await this.buildSubFrameOffsets(sender.tab, frameId, sender.url);
|
||||
subFrameOffsetsForTab.delete(frameId);
|
||||
await this.buildSubFrameOffsets(sender.tab, frameId, sender.url);
|
||||
}
|
||||
}
|
||||
|
||||
this.updateInlineMenuPositionTimeout = setTimeout(
|
||||
|
Loading…
Reference in New Issue
Block a user