mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	fix: auto scroll on enter
This commit is contained in:
		@@ -290,9 +290,7 @@ export function Chat(props: {
 | 
			
		||||
 | 
			
		||||
  // for auto-scroll
 | 
			
		||||
  const latestMessageRef = useRef<HTMLDivElement>(null);
 | 
			
		||||
 | 
			
		||||
  // wont scroll while hovering messages
 | 
			
		||||
  const [autoScroll, setAutoScroll] = useState(false);
 | 
			
		||||
  const [autoScroll, setAutoScroll] = useState(true);
 | 
			
		||||
 | 
			
		||||
  // preview messages
 | 
			
		||||
  const messages = (session.messages as RenderMessage[])
 | 
			
		||||
 
 | 
			
		||||
@@ -27,8 +27,7 @@ export const useUpdateStore = create<UpdateStore>()(
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
          const data = await (await fetch(FETCH_TAG_URL)).json();
 | 
			
		||||
          const sha = data[0].name as string;
 | 
			
		||||
          const remoteId = sha.substring(0, 7);
 | 
			
		||||
          const remoteId = data[0].name as string;
 | 
			
		||||
          set(() => ({
 | 
			
		||||
            lastUpdate: Date.now(),
 | 
			
		||||
            remoteId,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user