Fix clicking “Explore” or “Live feeds” column headers to scroll in advanced mode (#26633)
Co-authored-by: Plastikmensch <Plastikmensch@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									b2ac93dd73
								
							
						
					
					
						commit
						e90649b064
					
				@ -16,7 +16,19 @@ export default class Column extends PureComponent {
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  scrollTop () {
 | 
					  scrollTop () {
 | 
				
			||||||
    const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable');
 | 
					    let scrollable = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (this.props.bindToDocument) {
 | 
				
			||||||
 | 
					      scrollable = document.scrollingElement;
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      scrollable = this.node.querySelector('.scrollable');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // Some columns have nested `.scrollable` containers, with the outer one
 | 
				
			||||||
 | 
					      // being a wrapper while the actual scrollable content is deeper.
 | 
				
			||||||
 | 
					      if (scrollable.classList.contains('scrollable--flex')) {
 | 
				
			||||||
 | 
					        scrollable = scrollable?.querySelector('.scrollable') || scrollable;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!scrollable) {
 | 
					    if (!scrollable) {
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user