From 1b98a11e41185ef8f899db13f2b863d298517ab9 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Sat, 9 Nov 2024 13:20:49 +0100 Subject: [PATCH] Use existing clipboard helper --- panel/src/panel/events.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panel/src/panel/events.js b/panel/src/panel/events.js index 35cf2491c7..7f22804bc2 100644 --- a/panel/src/panel/events.js +++ b/panel/src/panel/events.js @@ -1,4 +1,5 @@ import { lcfirst } from "@/helpers/string"; +import clipboard from "@/helpers/clipboard"; import mitt from "mitt"; /** @@ -38,7 +39,7 @@ export default (panel) => { * @since 5.0.0 */ emitter.on("copyToClipboard", async (e) => { - navigator.clipboard.writeText(e); + clipboard.write(e); panel.notification.success(panel.t("copy.success") + "!"); });