diff --git a/js/search/search_form_handler.js b/js/search/search_form_handler.js index 7324a02fc..460271caa 100644 --- a/js/search/search_form_handler.js +++ b/js/search/search_form_handler.js @@ -1091,6 +1091,8 @@ $(function() this.submit.xhr.abort(); } + // Remove sticky state as we want to return at the beginning of the results + this._exitStickyState(); // Show loader this._showLoader(); this._cleanMessageArea(); @@ -1374,6 +1376,16 @@ $(function() }); } }, + /** + * Exit the sticky state for the whole search, returning to the top of the results + * @return {void} + */ + _exitStickyState: function() + { + this._onFormStopsBeingSticky(); + this._onResultsStopsBeingSticky(); + this.element.scrollParent().scrollTop(); + }, /** * @param oElem {Object} jQuery object representing the element to test * @return {boolean} True if oElem is currently sticking