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.

overlays: Don't close overlays when drawing selections.

Tim Abbott081d74141b13
diff --git a/static/js/overlays.js b/static/js/overlays.js
index ea47e59360a..de43f697e20 100644
--- a/static/js/overlays.js
+++ b/static/js/overlays.js
@@ -231,6 +231,10 @@ export function initialize() {
$("body").on("click", "div.overlay, div.overlay .exit", (e) => {
let $target = $(e.target);
+ if (document.getSelection().type === "Range") {
+ return;
+ }
+
// if the target is not the div.overlay element, search up the node tree
// until it is found.
if ($target.is(".exit, .exit-sign, .overlay-content, .exit span")) {