mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-30 22:41:33 +01:00
[PM-15943] - Revert When filling a password, the extension flickers (#13061)
* Revert "use requestAnimationFrame instead of arbitrary timeout" This reverts commit09a236b1e7
. * Revert "fix failing test" This reverts commitcb24266e9d
.
This commit is contained in:
parent
c6edd289cd
commit
40606ee8af
@ -280,10 +280,10 @@ describe("VaultPopupAutofillService", () => {
|
|||||||
|
|
||||||
it("should close popup after a timeout for chromium browsers", async () => {
|
it("should close popup after a timeout for chromium browsers", async () => {
|
||||||
mockPlatformUtilsService.isFirefox.mockReturnValue(false);
|
mockPlatformUtilsService.isFirefox.mockReturnValue(false);
|
||||||
jest.spyOn(global, "requestAnimationFrame");
|
jest.spyOn(global, "setTimeout");
|
||||||
await service.doAutofill(mockCipher);
|
await service.doAutofill(mockCipher);
|
||||||
jest.advanceTimersByTime(50);
|
jest.advanceTimersByTime(50);
|
||||||
expect(requestAnimationFrame).toHaveBeenCalled();
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
||||||
expect(BrowserApi.closePopup).toHaveBeenCalled();
|
expect(BrowserApi.closePopup).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ export class VaultPopupAutofillService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Slight delay to fix bug in Chromium browsers where popup closes without copying totp to clipboard
|
// Slight delay to fix bug in Chromium browsers where popup closes without copying totp to clipboard
|
||||||
requestAnimationFrame(() => BrowserApi.closePopup(window));
|
setTimeout(() => BrowserApi.closePopup(window), 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user