 
     # hide diff note form
     $(document).on "click", ".js-close-discussion-note-form", @cancelDiscussionForm
+
+    # fetch notes when tab becomes visible
+    $(document).on "visibilitychange", @visibilityChange
 
   cleanBinding: ->
     $(document).off "ajax:success", ".js-main-target-form"

    filename = $(this).val().replace(/^.*[\\\/]/, "")
    form.find(".js-attachment-filename").text filename

@Notes = Notes

    $(document).off "click", ".js-choose-note-attachment-button"
    $(document).off "click", ".js-discussion-reply-button"
    $(document).off "click", ".js-add-diff-note-button"
    $(document).off "visibilitychange"


  initRefresh: ->
