stream_edit: Remove use of e.trigger for copy link button.

This will help with the typescript conversion for this file.
This commit is contained in:
evykassirer 2024-11-03 16:31:45 -08:00 committed by Tim Abbott
parent de8caa1b43
commit 16e3894bfa
1 changed files with 5 additions and 3 deletions

View File

@ -40,6 +40,7 @@ import * as sub_store from "./sub_store";
import * as ui_report from "./ui_report"; import * as ui_report from "./ui_report";
import * as user_groups from "./user_groups"; import * as user_groups from "./user_groups";
import {user_settings} from "./user_settings"; import {user_settings} from "./user_settings";
import * as util from "./util";
const notification_labels_schema = stream_specific_notification_settings_schema.keyof(); 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); $("#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() { text() {
return address; return address;
}, },
}); });
// Show a tippy tooltip when the stream email address copied // Show a tippy tooltip when the stream email address copied
clipboard.on("success", (e) => { clipboard.on("success", () => {
show_copied_confirmation(e.trigger); show_copied_confirmation(submit_button);
}); });
$("#copy_email_address_modal .tag-checkbox").on("change", () => { $("#copy_email_address_modal .tag-checkbox").on("change", () => {