Issue #3458535: Middle click + drag doesn't work correctly if middle click is inside preview iframe
Notifying the parent document when the mousedown
and mouseup
events happen in the preview iframe with the middle mouse button involved was already in the codebase.
This PR extends that by dispatching an event on mousemove
. The parent document can react if the canvas is being panned.
I tried to play with the CSS approach that sets pointer-events
to none
on the iframe, but I ended up removing that, because it only works if that attribute is set before the mousedown
event occurs, which makes the iframe not interactive.
What's left
-
Get feedback to verify the approach. -
Fix the "flickering" of the canvas controls while panning — need to investigate why the component receives -1
for bothX
andY
values, then immediately updates to proper values. -
Sometimes after panning the scroll position the canvass get completely off. This happens even in the 0.x
branch, but it might make sense to try and address it here.
Edited by Jesse Baker