ui: Fix wrong usage of scrolling to top in ui.updateScrollbar.

This was a bug introduced in 2363c9955a.

Fixes: #11141.
This commit is contained in:
Shubham Dhama
2019-01-02 15:24:26 +05:30
committed by Tim Abbott
parent 1a72256e05
commit 092b73d0b7

View File

@@ -24,10 +24,11 @@ exports.set_up_scrollbar = function (element) {
element[0].perfectScrollbar = perfectScrollbar;
};
exports.update_scrollbar = function (element) {
exports.update_scrollbar = function (element_selector) {
var element = element_selector[0];
element.scrollTop = 0;
if (element[0].perfectScrollbar !== undefined) {
element[0].perfectScrollbar.update();
if (element.perfectScrollbar !== undefined) {
element.perfectScrollbar.update();
}
};