Skip to content

Issue #3458535: Middle click + drag doesn't work correctly if middle click is inside preview iframe

Bálint Kléri requested to merge issue/experience_builder-3458535:0.x into 0.x

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.

2024-07-08_17.02.43

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 both X and Y 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

Merge request reports

Loading