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: Don't move focus for clicks in compose box while composing.

evykassirere4fc19787154
diff --git a/web/src/click_handlers.js b/web/src/click_handlers.js
index e96be3a5011..945e600a9c0 100644
--- a/web/src/click_handlers.js
+++ b/web/src/click_handlers.js
@@ -884,7 +884,7 @@ export function initialize() {
popovers.hide_all(not_hide_tippy_instances);
}
- if (compose_state.composing()) {
+ if (compose_state.composing() && !$(e.target).parents("#compose").length) {
if (
$(e.target).closest("a").length > 0 ||
$(e.target).closest(".copy_codeblock").length > 0
@@ -899,7 +899,6 @@ export function initialize() {
$("#compose-textarea").trigger("focus");
return;
} else if (
- !$(e.target).parents("#compose").length &&
!window.getSelection().toString() &&
// Clicking any input or text area should not close
// the compose box; this means using the sidebar