             @areFiltersHidden = false
 
         toggleContextPanelButtonClicked: =>
-            @areFiltersManuallyHidden = not @areFiltersManuallyHidden
-
             if @areFiltersHidden
+                @areFiltersManuallyHidden = false
                 @showContextPanel()
             else
+                @areFiltersManuallyHidden = true
                 @hideContextPanel()
 
         showContextPanel: =>

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

                    if not @areFiltersManuallyHidden
                        @showContextPanel()

                    # Move the results navbar to the top
                    @ui.navbar.css('top', @topNavbarHeight)
                    @ui.navbar.addClass('navbar-fixed-top')
                    @ui.contextContainer.css('margin-top',
                        @navbarVerticalOffset + 10)

                    if not @areFiltersManuallyHidden
                        @hideContextPanel()
