You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-03 00:33:22 +03:00 
			
		
		
		
	Hide scrollbar if content height is smaller than scroll node height (#7220)
This commit is contained in:
		@@ -120,6 +120,10 @@ limitations under the License.
 | 
				
			|||||||
    overflow-y: auto;
 | 
					    overflow-y: auto;
 | 
				
			||||||
    flex: 1 1 0;
 | 
					    flex: 1 1 0;
 | 
				
			||||||
    overflow-anchor: none;
 | 
					    overflow-anchor: none;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    &[data-scrollbar=false] {
 | 
				
			||||||
 | 
					        overflow-y: hidden;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.mx_RoomView_messagePanelSearchSpinner {
 | 
					.mx_RoomView_messagePanelSearchSpinner {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -750,6 +750,8 @@ export default class ScrollPanel extends React.Component<IProps> {
 | 
				
			|||||||
        const minHeight = sn.clientHeight;
 | 
					        const minHeight = sn.clientHeight;
 | 
				
			||||||
        const height = Math.max(minHeight, contentHeight);
 | 
					        const height = Math.max(minHeight, contentHeight);
 | 
				
			||||||
        this.pages = Math.ceil(height / PAGE_SIZE);
 | 
					        this.pages = Math.ceil(height / PAGE_SIZE);
 | 
				
			||||||
 | 
					        const displayScrollbar = contentHeight > minHeight;
 | 
				
			||||||
 | 
					        sn.dataset.scrollbar = displayScrollbar.toString();
 | 
				
			||||||
        this.bottomGrowth = 0;
 | 
					        this.bottomGrowth = 0;
 | 
				
			||||||
        const newHeight = `${this.getListHeight()}px`;
 | 
					        const newHeight = `${this.getListHeight()}px`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user