N°4062 - Advanced search: Fix visual glitch when submitting the search while the results are sticking

This commit is contained in:
Molkobain
2021-08-25 20:55:58 +02:00
parent 335074701f
commit 4ae7090a51

View File

@@ -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