Merge pull request #10506 from colinux/fix-clipboad-targets
Bouton copier/coller: améliore support quand le clipboard n'est pas disponible
This commit is contained in:
commit
ed3630e621
1 changed files with 5 additions and 1 deletions
|
@ -17,9 +17,13 @@ export class ClipboardController extends Controller {
|
|||
connect(): void {
|
||||
// some extensions or browsers block clipboard
|
||||
if (!navigator.clipboard) {
|
||||
if (this.hasToHideTarget) {
|
||||
this.toHideTarget.classList.add('hidden');
|
||||
} else {
|
||||
this.element.classList.add('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
disconnect(): void {
|
||||
clearTimeout(this.#timer);
|
||||
|
|
Loading…
Reference in a new issue