Commit ccabbaa9 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Wait until listeners are set before triggering a 'click' event

parent 7fdc2971
......@@ -190,6 +190,10 @@ class @MergeRequestTabs
shrinkView: ->
$gutterIcon = $('.gutter-toggle i')
# Only when sidebar is collapsed
if $gutterIcon.is('.fa-angle-double-right')
$gutterIcon.closest('a').trigger('click')
# Wait until listeners are set
setTimeout( ->
# Only when sidebar is collapsed
if $gutterIcon.is('.fa-angle-double-right')
$gutterIcon.closest('a').trigger('click')
, 0)
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