Fix totp copy not working in Chrome (#2067)
* Fix totp copy not working in Chrome * Only use fix for Chromium-based browsers
This commit is contained in:
parent
f4fc458542
commit
2449534e9e
|
@ -156,7 +156,12 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||
this.platformUtilsService.copyToClipboard(this.totpCode, { window: window });
|
||||
}
|
||||
if (this.popupUtilsService.inPopup(window)) {
|
||||
if (this.platformUtilsService.isFirefox() || this.platformUtilsService.isSafari()) {
|
||||
BrowserApi.closePopup(window);
|
||||
} else {
|
||||
// Slight delay to fix bug in Chromium browsers where popup closes without copying totp to clipboard
|
||||
setTimeout(() => BrowserApi.closePopup(window), 50);
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
this.ngZone.run(() => {
|
||||
|
|
Loading…
Reference in New Issue