mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 08:13:43 +08:00 
			
		
		
		
	feat: right-click to copy message to user input
This commit is contained in:
		@@ -605,6 +605,10 @@ export function Chat() {
 | 
			
		||||
  const onRightClick = (e: any, message: ChatMessage) => {
 | 
			
		||||
    // copy to clipboard
 | 
			
		||||
    if (selectOrCopy(e.currentTarget, message.content)) {
 | 
			
		||||
      if (userInput.length === 0) {
 | 
			
		||||
        setUserInput(message.content);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      e.preventDefault();
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user