                 if not c.isSupported()
                     $('.serrano-version-warning').show()
 
-        toggleContextPanel: =>
-            if @ui.contextContainer.css('display') == 'none'
-                # Restore the context panel
-                @ui.contextContainer.css('display', 'block')
-                @ui.resultsContainer.addClass('span9')
-                @$('#toggle-context-panel-button').html('Hide Filters...')
-            else
-                # Hide the context panel
-                @ui.contextContainer.css('display', 'none')
-                @ui.resultsContainer.removeClass('span9')
-                @$('#toggle-context-panel-button').html('Show Filters...')
+            # Used to tell if filters were hidden by user clicking the button
+            @areFiltersManuallyHidden = false
+            # Flag indicating the current visibility of the context panel
+            @areFiltersHidden = false
+
+        toggleContextPanelButtonClicked: =>
+            @areFiltersManuallyHidden = not @areFiltersManuallyHidden
+
+            if @areFiltersHidden
+                @showContextPanel()
+            else
+                @hideContextPanel()
+
+        showContextPanel: =>
+            @areFiltersHidden = false
+            @ui.contextContainer.css('display', 'block')
+            @ui.resultsContainer.addClass('span9')
+            @$('#toggle-context-panel-button').html('Hide Filters...')
+
+        hideContextPanel: =>
+            @areFiltersHidden = true
+            @ui.contextContainer.css('display', 'none')
+            @ui.resultsContainer.removeClass('span9')
+            @$('#toggle-context-panel-button').html('Show Filters...')
 
         onPageScroll: =>
             # If the view isn't rendered yet, then don't bother

            'click #pages-text-ranges': 'selectPagesOption'
            'click [data-toggle=create-report]': 'showCreateReport'
            'click #toggle-context-panel-button': 'toggleContextPanel'

        regions:
            count: '.count-region'

                if scrollPos < (@navbarVerticalOffset - @topNavbarHeight)
                    # Remove the results navbar from the top
                    @ui.navbar.removeClass('navbar-fixed-top')

                    if not @areFiltersManuallyHidden
                        @showContextPanel()
            else
                if scrollPos >= (@navbarVerticalOffset - @topNavbarHeight)
                    # Move the results navbar to the top
                    @ui.navbar.css('top', @topNavbarHeight)
                    @ui.navbar.addClass('navbar-fixed-top')

                    if not @areFiltersManuallyHidden
                        @hideContextPanel()

        selectPagesOption: ->
            $('#pages-radio-all').prop('checked', false)
