mirror of https://github.com/node-red/node-red.git
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.pull/4716/head
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()];
|
||||
|
|
Loading…
Reference in New Issue