Commit 6c9f5a50 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Skip element that is wrapped by a link

This fixes the double request being made to the same URL
parent 65187efa
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment