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 focus elements on dragstart.

Gittenburgc42c2a9a22e4
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js
index 35751019563..55d0f2efcc7 100644
--- a/static/js/click_handlers.js
+++ b/static/js/click_handlers.js
@@ -732,7 +732,14 @@ exports.initialize = function () {
// End Webathena code
// disable the draggability for left-sidebar components
- $('#stream_filters, #global_filters').on('dragstart', () => false);
+ $('#stream_filters, #global_filters').on('dragstart', (e) => {
+ e.target.blur();
+ return false;
+ });
+
+ // Chrome focuses an element when dragging it which can be confusing when
+ // users involuntarily drag something and we show them the focus outline.
+ $('body').on('dragstart', (e) => e.target.blur());
(function () {
const map = {