mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
click_handlers: Don't focus elements on dragstart.
Chrome focuses elements when you start dragging them, which can confuse users because of our focus outline.
This commit is contained in:
@@ -732,7 +732,14 @@ exports.initialize = function () {
|
|||||||
// End Webathena code
|
// End Webathena code
|
||||||
|
|
||||||
// disable the draggability for left-sidebar components
|
// 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 () {
|
(function () {
|
||||||
const map = {
|
const map = {
|
||||||
|
|||||||
Reference in New Issue
Block a user