FIX: shift+click on links
Default browser's behavior when shift+clicking was messed up. This adds the shift key modifier to the list of click modifiers in both `click_track` and `discourse`. Also updated & refactored a bit the `click_track_spec`.
This commit is contained in:
@@ -68,7 +68,7 @@ Discourse.ClickTrack = {
|
||||
}
|
||||
|
||||
// if they want to open in a new tab, do an AJAX request
|
||||
if (e.metaKey || e.ctrlKey || e.which === 2) {
|
||||
if (e.shiftKey || e.metaKey || e.ctrlKey || e.which === 2) {
|
||||
Discourse.ajax(Discourse.getURL("/clicks/track"), {
|
||||
data: {
|
||||
url: href,
|
||||
|
||||
Reference in New Issue
Block a user