mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: CTRL+mouse-left-click / CMD+mouse-left-click or mouse-middle-click should open link in new tab
This commit is contained in:
parent
6750ff6873
commit
8b59ce9183
1 changed files with 2 additions and 1 deletions
|
@ -129,7 +129,8 @@ export default {
|
|||
}
|
||||
|
||||
// Otherwise, use a custom URL with a redirect
|
||||
if (Discourse.User.currentProp('external_links_in_new_tab')) {
|
||||
// consider CTRL+mouse-left-click / CMD+mouse-left-click or mouse-middle-click as well
|
||||
if (Discourse.User.currentProp('external_links_in_new_tab') || ((e.ctrlKey || e.metaKey) && (e.which === 1)) || (e.which === 2)) {
|
||||
window.open(destUrl, '_blank').focus();
|
||||
} else {
|
||||
DiscourseURL.redirectTo(destUrl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue