Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upload: Fix close widget in edit form banners not working.

Tim Abbottc70910b5dce5
diff --git a/web/src/upload.js b/web/src/upload.js
index b4b3e164c9b..1000ac6b6fe 100644
--- a/web/src/upload.js
+++ b/web/src/upload.js
@@ -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) => {