From 16e3894bfa26d08b85088cfe93ebf58abfad697a Mon Sep 17 00:00:00 2001 From: evykassirer Date: Sun, 3 Nov 2024 16:31:45 -0800 Subject: [PATCH] stream_edit: Remove use of e.trigger for copy link button. This will help with the typescript conversion for this file. --- web/src/stream_edit.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/stream_edit.js b/web/src/stream_edit.js index dfcaa82377..6054a5f463 100644 --- a/web/src/stream_edit.js +++ b/web/src/stream_edit.js @@ -40,6 +40,7 @@ import * as sub_store from "./sub_store"; import * as ui_report from "./ui_report"; import * as user_groups from "./user_groups"; import {user_settings} from "./user_settings"; +import * as util from "./util"; const notification_labels_schema = stream_specific_notification_settings_schema.keyof(); @@ -405,15 +406,16 @@ function show_stream_email_address_modal(address) { }); $("#show-sender").prop("checked", true); - const clipboard = new ClipboardJS("#copy_email_address_modal .dialog_submit_button", { + const submit_button = util.the($("#copy_email_address_modal .dialog_submit_button")); + const clipboard = new ClipboardJS(submit_button, { text() { return address; }, }); // Show a tippy tooltip when the stream email address copied - clipboard.on("success", (e) => { - show_copied_confirmation(e.trigger); + clipboard.on("success", () => { + show_copied_confirmation(submit_button); }); $("#copy_email_address_modal .tag-checkbox").on("change", () => {