mirror of
				https://github.com/lingble/twenty.git
				synced 2025-10-30 20:27:55 +00:00 
			
		
		
		
	[ Fix ] [ Issue - 5701 ] Mouse down and drag is selecting records, while file import modal is open (#5716)
## Changes Made - Prevent mouse event propagation outside modal - Prevent text selection inside the modal during drag event ## Related Issue https://github.com/twentyhq/twenty/issues/5701 ## Evidence ### Before https://github.com/twentyhq/twenty/assets/87609792/c15c2a1d-5e3b-4fc5-a98a-638615e8d7b9 ### After Actual drag operation is done, but not visible in the video https://github.com/twentyhq/twenty/assets/87609792/f2e68e67-1eb1-4a15-83c8-8cb4313bcaa1 --------- Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
This commit is contained in:
		 Anand Krishnan M J
					Anand Krishnan M J
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							fa70f9cfc7
						
					
				
				
					commit
					ce1469cf0c
				
			| @@ -82,6 +82,7 @@ const StyledBackDrop = styled(motion.div)` | ||||
|   top: 0; | ||||
|   width: 100%; | ||||
|   z-index: 9999; | ||||
|   user-select: none; | ||||
| `; | ||||
|  | ||||
| /** | ||||
| @@ -141,8 +142,12 @@ export const ModalLayout = ({ | ||||
|   modalRef, | ||||
|   className, | ||||
| }: ModalLayoutProps) => { | ||||
|   const stopEventPropagation = (e: React.MouseEvent) => { | ||||
|     e.stopPropagation(); | ||||
|   }; | ||||
|  | ||||
|   return ( | ||||
|     <StyledBackDrop> | ||||
|     <StyledBackDrop onMouseDown={stopEventPropagation}> | ||||
|       <StyledModalDiv | ||||
|         // framer-motion seems to have typing problems with refs | ||||
|         // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||||
|   | ||||
		Reference in New Issue
	
	Block a user