1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-24 12:06:15 +01:00

[PM-14054] Fix scroll based re-positioning of the inline menu within iframes after setting is changed to on button click (#11763)

This commit is contained in:
Cesar Gonzalez 2024-10-28 16:43:06 -05:00 committed by GitHub
parent 9da80a6cba
commit 3fe84b041a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1009,7 +1009,10 @@ export class OverlayBackground implements OverlayBackgroundInterface {
this.logService.error(error),
);
if ((await this.getInlineMenuVisibility()) === AutofillOverlayVisibility.OnButtonClick) {
if (
(await this.getInlineMenuVisibility()) === AutofillOverlayVisibility.OnButtonClick &&
!this.isInlineMenuListVisible
) {
return;
}
@ -2579,7 +2582,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
* @param sender
*/
private resetFocusedFieldSubFrameOffsets(sender: chrome.runtime.MessageSender) {
if (this.focusedFieldData.frameId > 0 && this.subFrameOffsetsForTab[sender.tab.id]) {
if (this.focusedFieldData?.frameId > 0 && this.subFrameOffsetsForTab[sender.tab.id]) {
this.subFrameOffsetsForTab[sender.tab.id].set(this.focusedFieldData.frameId, null);
}
}
@ -2592,6 +2595,7 @@ export class OverlayBackground implements OverlayBackgroundInterface {
*/
private async triggerSubFrameFocusInRebuild(sender: chrome.runtime.MessageSender) {
this.cancelInlineMenuFadeInAndPositionUpdate();
this.resetFocusedFieldSubFrameOffsets(sender);
this.rebuildSubFrameOffsets$.next(sender);
this.repositionInlineMenu$.next(sender);
}