mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[PS-1438] Prevent new line feed when selecting and copying passwords (#3460)
* Prevent new line feed when selecting password * Prevent new line feed when copying password
This commit is contained in:
parent
ac1c7f9c8f
commit
1d7360bfdd
@ -561,7 +561,6 @@ h2,
|
||||
h3,
|
||||
label,
|
||||
a,
|
||||
button,
|
||||
p,
|
||||
img,
|
||||
.box-header,
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Directive, ElementRef, HostListener, Input } from "@angular/core";
|
||||
|
||||
import { ClientType } from "@bitwarden/common/enums";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
|
||||
@Directive({
|
||||
@ -15,6 +16,9 @@ export class CopyTextDirective {
|
||||
return;
|
||||
}
|
||||
|
||||
const timeout = this.platformUtilsService.getClientType() === ClientType.Desktop ? 100 : 0;
|
||||
setTimeout(() => {
|
||||
this.platformUtilsService.copyToClipboard(this.copyText, { window: window });
|
||||
}, timeout);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user