Skip to content

Commit

Permalink
Fix #15225: command+click opens in same tab:
Browse files Browse the repository at this point in the history
Add metaKey (Command key on Mac or Windows key) to modifier keys
that prevent using Ajax

Signed-off-by: Lukas Bixen <lrb2_@outlook.com>
  • Loading branch information
lrb2 committed Aug 10, 2021
1 parent ce9f1ec commit 51a79fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/ajax.js
Expand Up @@ -233,7 +233,7 @@ var AJAX = {
// leave the browser deal with it natively (e.g: file download)
// or leave an existing ajax event handler present elsewhere deal with it
var href = $(this).attr('href');
if (typeof event !== 'undefined' && (event.shiftKey || event.ctrlKey)) {
if (typeof event !== 'undefined' && (event.shiftKey || event.ctrlKey || event.metaKey)) {
return true;
} else if ($(this).attr('target')) {
return true;
Expand Down

0 comments on commit 51a79fe

Please sign in to comment.