mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 05:53:43 +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 = "";
|
||||
});
|
||||
|
||||
// These are close-click handlers for error banners that aren't associated
|
||||
// with a particular file.
|
||||
$("#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(
|
||||
const $banner_container = get_item("banner_container", config);
|
||||
$banner_container.on(
|
||||
"click",
|
||||
".upload_banner.file_generic_error .compose_banner_close_button",
|
||||
(event) => {
|
||||
|
||||
Reference in New Issue
Block a user