1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-29 22:31:29 +01:00

[PM-15943] - Revert When filling a password, the extension flickers (#13061)

* Revert "use requestAnimationFrame instead of arbitrary timeout"

This reverts commit 09a236b1e7.

* Revert "fix failing test"

This reverts commit cb24266e9d.
This commit is contained in:
Jordan Aasen 2025-01-24 11:09:04 -08:00 committed by GitHub
parent c6edd289cd
commit 40606ee8af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -280,10 +280,10 @@ describe("VaultPopupAutofillService", () => {
it("should close popup after a timeout for chromium browsers", async () => {
mockPlatformUtilsService.isFirefox.mockReturnValue(false);
jest.spyOn(global, "requestAnimationFrame");
jest.spyOn(global, "setTimeout");
await service.doAutofill(mockCipher);
jest.advanceTimersByTime(50);
expect(requestAnimationFrame).toHaveBeenCalled();
expect(setTimeout).toHaveBeenCalledTimes(1);
expect(BrowserApi.closePopup).toHaveBeenCalled();
});

View File

@ -280,7 +280,7 @@ export class VaultPopupAutofillService {
}
// 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);
}
/**