mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
upload: Fix close widget in edit form banners not working.
The selector was wrong, but the logic also created a bunch of duplicate click handlers.
This commit is contained in:
@@ -270,18 +270,8 @@ export function setup_upload(config) {
|
|||||||
event.target.value = "";
|
event.target.value = "";
|
||||||
});
|
});
|
||||||
|
|
||||||
// These are close-click handlers for error banners that aren't associated
|
const $banner_container = get_item("banner_container", config);
|
||||||
// with a particular file.
|
$banner_container.on(
|
||||||
$("#compose_banners").on(
|
|
||||||
"click",
|
|
||||||
".upload_banner.file_generic_error .compose_banner_close_button",
|
|
||||||
(event) => {
|
|
||||||
event.preventDefault();
|
|
||||||
$(event.target).parents(".upload_banner").remove();
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
$("#edit_form_banners").on(
|
|
||||||
"click",
|
"click",
|
||||||
".upload_banner.file_generic_error .compose_banner_close_button",
|
".upload_banner.file_generic_error .compose_banner_close_button",
|
||||||
(event) => {
|
(event) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user