1
0
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:
Cesar Gonzalez 2024-06-06 10:39:25 -05:00
parent 9fe7c2f643
commit 67db794eda
No known key found for this signature in database
GPG Key ID: 3381A5457F8CCECF

View File

@ -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(