@arsedizioni/ars-utils 21.0.36 → 21.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,14 +187,18 @@ class InfoDialogComponent {
187
187
  async copy() {
188
188
  const html = this.dialogData.message + "<br><br>" + (this.dialogData.details ? this.dialogData.details : "");
189
189
  const htmlBlob = new Blob([html], { type: 'text/html' });
190
+ const textBlob = new Blob([html], { type: 'text/plain' });
190
191
  try {
191
192
  const data = [
192
193
  new ClipboardItem({
193
194
  'text/html': htmlBlob,
194
- 'text/plain': htmlBlob
195
+ 'text/plain': textBlob
195
196
  })
196
197
  ];
197
- await navigator.clipboard.write(data);
198
+ setTimeout(async () => {
199
+ window.focus();
200
+ await navigator.clipboard.write(data);
201
+ }, 0);
198
202
  this.dialogService.toast("Copiato negli appunti.");
199
203
  }
200
204
  catch (err) {