tweak scroll tolerance
This commit is contained in:
		
							parent
							
								
									68cd41a6dc
								
							
						
					
					
						commit
						71a770c24e
					
				|  | @ -36,7 +36,7 @@ export const Chat: FC<Props> = ({ conversation, models, messageIsStreaming, mode | ||||||
|   const handleScroll = () => { |   const handleScroll = () => { | ||||||
|     if (chatContainerRef.current) { |     if (chatContainerRef.current) { | ||||||
|       const { scrollTop, scrollHeight, clientHeight } = chatContainerRef.current; |       const { scrollTop, scrollHeight, clientHeight } = chatContainerRef.current; | ||||||
|       const bottomTolerance = 50; |       const bottomTolerance = 30; | ||||||
| 
 | 
 | ||||||
|       if (scrollTop + clientHeight < scrollHeight - bottomTolerance) { |       if (scrollTop + clientHeight < scrollHeight - bottomTolerance) { | ||||||
|         setAutoScrollEnabled(false); |         setAutoScrollEnabled(false); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue