mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							1a72256e05
						
					
				
				
					commit
					092b73d0b7
				
			@@ -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();
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user