[PM-14054] Fix scroll based re positioning when inline menu settings change occurs (#11765)
This commit is contained in:
parent
3fe84b041a
commit
11f18c478e
|
@ -629,6 +629,9 @@ describe("OverlayBackground", () => {
|
||||||
|
|
||||||
it("skips updating the inline menu list if the user has the inline menu set to open on button click", async () => {
|
it("skips updating the inline menu list if the user has the inline menu set to open on button click", async () => {
|
||||||
inlineMenuVisibilityMock$.next(AutofillOverlayVisibility.OnButtonClick);
|
inlineMenuVisibilityMock$.next(AutofillOverlayVisibility.OnButtonClick);
|
||||||
|
jest
|
||||||
|
.spyOn(overlayBackground as any, "checkIsInlineMenuListVisible")
|
||||||
|
.mockReturnValue(false);
|
||||||
tabsSendMessageSpy.mockImplementation((_tab, message, _options) => {
|
tabsSendMessageSpy.mockImplementation((_tab, message, _options) => {
|
||||||
if (message.command === "checkFocusedFieldHasValue") {
|
if (message.command === "checkFocusedFieldHasValue") {
|
||||||
return Promise.resolve(true);
|
return Promise.resolve(true);
|
||||||
|
|
|
@ -1010,8 +1010,8 @@ export class OverlayBackground implements OverlayBackgroundInterface {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(await this.getInlineMenuVisibility()) === AutofillOverlayVisibility.OnButtonClick &&
|
!this.checkIsInlineMenuListVisible() &&
|
||||||
!this.isInlineMenuListVisible
|
(await this.getInlineMenuVisibility()) === AutofillOverlayVisibility.OnButtonClick
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue