chromium-bidi icon indicating copy to clipboard operation
chromium-bidi copied to clipboard

Wrong events coordinates in iFrames

Open sadym-chromium opened this issue 1 year ago • 3 comments

In input.performActions command, with origin: "viewport" and context of iframe, the wrong coordinates are used.

Repro: test_move_to_origin_position_within_frame.

sadym-chromium avatar Sep 20 '24 07:09 sadym-chromium

We can try to traverse up the frame tree and try to get the frame offset. This approach wouldn't work for shadow tree though

sadym-chromium avatar Sep 20 '24 08:09 sadym-chromium

But the Shadow DOM doesn't have its own viewport. It's sharing it with the viewport of the main document. Or am I wrong? But it could happen that there is an iframe within the Shadow DOM which indeed would have to be taken into account. I don't think that we have a test case for that yet.

whimboo avatar Sep 20 '24 09:09 whimboo

This sounds similar to what I reported half a year ago in https://issues.chromium.org/issues/359616812 . Probably that bug report should live in this project rather.

I have a small standalone reproducer for this bug:

git clone https://github.com/martinpitt/bidi-test
cd bidi-test
python3 -m http.server
./bidimouse.py

The https://github.com/martinpitt/bidi-test has details about this bug and how to run it.

martinpitt avatar Feb 24 '25 08:02 martinpitt