summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/merge_request_tabs.js.coffee10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee
index e6e502cf6b6..40cfa59a229 100644
--- a/app/assets/javascripts/merge_request_tabs.js.coffee
+++ b/app/assets/javascripts/merge_request_tabs.js.coffee
@@ -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)
+