mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 11:13:46 +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,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),
|
||||
|
||||
Reference in New Issue
Block a user