Commit 114d3c98 authored by Phil Hughes's avatar Phil Hughes

Fixed issue with sidebar edit links toggling anchor

This caused an issue with the page scrolling from the bottom to the top. Also stopped the dropdown links doing the same.
parent 2011f02b
...@@ -9,7 +9,16 @@ class @IssuableContext ...@@ -9,7 +9,16 @@ class @IssuableContext
$(".issuable-sidebar .inline-update").on "change", ".js-assignee", -> $(".issuable-sidebar .inline-update").on "change", ".js-assignee", ->
$(this).submit() $(this).submit()
$(document).off("click", ".edit-link").on "click",".edit-link", (e) -> $(document)
.off 'click', '.dropdown-content a'
.on 'click', '.dropdown-content a', (e) ->
e.preventDefault()
$(document)
.off 'click', '.edit-link'
.on 'click', '.edit-link', (e) ->
e.preventDefault()
$block = $(@).parents('.block') $block = $(@).parents('.block')
$selectbox = $block.find('.selectbox') $selectbox = $block.find('.selectbox')
if $selectbox.is(':visible') if $selectbox.is(':visible')
...@@ -20,9 +29,9 @@ class @IssuableContext ...@@ -20,9 +29,9 @@ class @IssuableContext
$block.find('.value').hide() $block.find('.value').hide()
if $selectbox.is(':visible') if $selectbox.is(':visible')
setTimeout (-> setTimeout ->
$block.find('.dropdown-menu-toggle').trigger 'click' $block.find('.dropdown-menu-toggle').trigger 'click'
), 0 , 0
$(".right-sidebar").niceScroll() $(".right-sidebar").niceScroll()
......
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