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