Wait until listeners are set before triggering a 'click' event
This commit is contained in:
parent
7fdc29715a
commit
ccabbaa9b3
1 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue