diff --git a/web/src/click_handlers.js b/web/src/click_handlers.js index 7ae5f291af..e79c5f82b6 100644 --- a/web/src/click_handlers.js +++ b/web/src/click_handlers.js @@ -679,14 +679,6 @@ export function initialize() { return; } - // Don't let clicks in the compose area count as - // "unfocusing" our compose -- in other words, e.g. - // clicking "Press Enter to send" should not - // trigger the composebox-closing code in MAIN CLICK HANDLER. - // But do allow our formatting link. - if (!$target.is("a")) { - e.stopPropagation(); - } // Still hide the popovers, however popovers.hide_all(); } @@ -876,6 +868,7 @@ 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