1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 19:23:52 +00: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:
Cesar Gonzalez
2024-06-06 10:39:25 -05:00
parent 9fe7c2f643
commit 67db794eda

View File

@@ -343,15 +343,12 @@ export class OverlayBackground implements OverlayBackgroundInterface {
return;
}
const subFrameOffsetsForTab = this.subFrameOffsetsForTab[sender.tab.id];
if (!subFrameOffsetsForTab) {
return;
}
if (this.updateInlineMenuPositionTimeout) {
clearTimeout(this.updateInlineMenuPositionTimeout);
}
const subFrameOffsetsForTab = this.subFrameOffsetsForTab[sender.tab.id];
if (subFrameOffsetsForTab) {
const tabFrameIds = Array.from(subFrameOffsetsForTab.keys());
for (const frameId of tabFrameIds) {
if (frameId === sender.frameId) {
@@ -361,6 +358,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
subFrameOffsetsForTab.delete(frameId);
await this.buildSubFrameOffsets(sender.tab, frameId, sender.url);
}
}
this.updateInlineMenuPositionTimeout = setTimeout(
() => this.updateInlineMenuPositionAfterSubFrameRebuild(sender),