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,7 +17,11 @@ export class ClipboardController extends Controller {
|
|||
connect(): void {
|
||||
// some extensions or browsers block clipboard
|
||||
if (!navigator.clipboard) {
|
||||
this.element.classList.add('hidden');
|
||||
if (this.hasToHideTarget) {
|
||||
this.toHideTarget.classList.add('hidden');
|
||||
} else {
|
||||
this.element.classList.add('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue