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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user