mirror of https://github.com/zulip/zulip.git
click_handlers: Don't focus links on middle / right click.
This commit is contained in:
parent
ffdbf1afec
commit
e15189b20c
|
@ -739,7 +739,17 @@ exports.initialize = function () {
|
|||
|
||||
// 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());
|
||||
$('body').on('dragstart', 'a', (e) => e.target.blur());
|
||||
|
||||
// Don't focus links on middle click.
|
||||
$('body').on('mouseup', 'a', (e) => {
|
||||
if (e.which === 2) { // middle click
|
||||
e.target.blur();
|
||||
}
|
||||
});
|
||||
|
||||
// Don't focus links on context menu.
|
||||
$('body').on('contextmenu', 'a', (e) => e.target.blur());
|
||||
|
||||
(function () {
|
||||
const map = {
|
||||
|
|
Loading…
Reference in New Issue