mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix panning with middle mouse button on windows 10/11
Without preventDefault, when you try to drag the canvas with middle mouse button on Windows (e.g. in Chrome), the cursor change to a "scroll cursor" and the canvas scrolls endlessly instead of being dragged accurately.
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							da97c5d558
						
					
				
				
					commit
					fac79fd068
				
			| @@ -1190,6 +1190,7 @@ RED.view = (function() { | ||||
|  | ||||
|         if (d3.event.button === 1) { | ||||
|             // Middle Click pan | ||||
|             d3.event.preventDefault(); | ||||
|             mouse_mode = RED.state.PANNING; | ||||
|             mouse_position = [d3.event.pageX,d3.event.pageY] | ||||
|             scroll_position = [chart.scrollLeft(),chart.scrollTop()]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user