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:
Gittenburg
2020-07-16 10:03:13 +02:00
committed by Tim Abbott
parent 289819fb70
commit c42c2a9a22

View File

@@ -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 = {