don't expand image or inline quote if e.metaKey
on osx, command(⌘)+click opens links in new tabs. e.metaKey is true when command is held.
This commit is contained in:
parent
2114c86866
commit
5bda49fb79
@ -2457,7 +2457,9 @@
|
||||
},
|
||||
toggle: function(e) {
|
||||
var id;
|
||||
if (e.shiftKey || e.altKey || e.ctrlKey || e.button !== 0) return;
|
||||
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || e.button !== 0) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
id = this.hash.slice(1);
|
||||
if (/\binlined\b/.test(this.className)) {
|
||||
@ -2933,7 +2935,9 @@
|
||||
},
|
||||
cb: {
|
||||
toggle: function(e) {
|
||||
if (e.shiftKey || e.altKey || e.ctrlKey || e.button !== 0) return;
|
||||
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || e.button !== 0) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
return imgExpand.toggle(this);
|
||||
},
|
||||
|
||||
@ -1944,7 +1944,7 @@ quoteInline =
|
||||
quote.removeAttribute 'onclick'
|
||||
$.on quote, 'click', quoteInline.toggle
|
||||
toggle: (e) ->
|
||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0
|
||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||
e.preventDefault()
|
||||
id = @hash[1..]
|
||||
if /\binlined\b/.test @className
|
||||
@ -2279,7 +2279,7 @@ imgExpand =
|
||||
imgExpand.expand a.firstChild
|
||||
cb:
|
||||
toggle: (e) ->
|
||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0
|
||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||
e.preventDefault()
|
||||
imgExpand.toggle @
|
||||
all: ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user