fix(editor): copying to clipboard with no ClipboardEvent (#10729)

* fix(editor): copying to clipboard with no ClipboardEvent

* fix(editor): use green for `success` state of `FilledButton`
This commit is contained in:
David Luzar
2026-02-01 11:06:37 +01:00
committed by GitHub
parent d29fd62e41
commit 54a9826817
2 changed files with 4 additions and 5 deletions
+3 -5
View File
@@ -635,13 +635,13 @@ export const copyTextToSystemClipboard = async <
throw new Error("Failed to setData on clipboardEvent");
}
}
return;
}
return;
} catch (error: any) {
console.error(error);
}
let plainTextEntry = entries.find(
const plainTextEntry = entries.find(
([mimeType]) => mimeType === MIME_TYPES.text,
);
@@ -653,9 +653,7 @@ export const copyTextToSystemClipboard = async <
// NOTE: doesn't work on FF on non-HTTPS domains, or when document
// not focused
await navigator.clipboard.writeText(plainTextEntry[1]);
// invalidate it so we don't write it again below
plainTextEntry = undefined;
return;
} catch (error: any) {
console.error(error);
}
@@ -53,6 +53,7 @@
&.ExcButton--status-loading,
&.ExcButton--status-success {
pointer-events: none;
background-color: var(--color-success);
.ExcButton__contents {
visibility: hidden;