Skip element that is wrapped by a link
This fixes the double request being made to the same URL
This commit is contained in:
parent
65187efa5c
commit
6c9f5a50e9
|
@ -5,7 +5,9 @@ class @TreeView
|
|||
# Code browser tree slider
|
||||
# Make the entire tree-item row clickable, but not if clicking another link (like a commit message)
|
||||
$(".tree-content-holder .tree-item").on 'click', (e) ->
|
||||
if (e.target.nodeName != "A")
|
||||
$clickedEl = $(e.target)
|
||||
|
||||
if not $clickedEl.is('a') and not $clickedEl.is('.str-truncated')
|
||||
path = $('.tree-item-file-name a', this).attr('href')
|
||||
Turbolinks.visit(path)
|
||||
|
||||
|
|
Loading…
Reference in New Issue