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.

click_handlers: Do not close compose box when clicking inputs.

YashRE420ddf31970989
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js
index 507fc30fb9b..86794fde71a 100644
--- a/static/js/click_handlers.js
+++ b/static/js/click_handlers.js
@@ -858,6 +858,13 @@ export function initialize() {
return;
} else if (
!window.getSelection().toString() &&
+ // Clicking any input or text area should not close
+ // the compose box; this means using the sidebar
+ // filters or search widgets won't unnecessarily close
+ // compose.
+ !$(e.target).closest("input").length &&
+ !$(e.target).closest("textarea").length &&
+ !$(e.target).closest("select").length &&
// Clicks inside an overlay, popover, custom
// modal, or backdrop of one of the above
// should not have any effect on the compose