Bug 1947721 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The following WebDriver test fails in Firefox because not a single `pointermove` event is recognized (and added to the events list):

```
def test_move_to_position(session, inline, touch_chain):
    session.url = inline("""
        <script>
          var allEvents = { events: [] };
          window.addEventListener("pointermove", ev => {
            allEvents.events.push({
                "type": event.type,
                "pageX": event.pageX,
                "pageY": event.pageY,
            });
          }, { once: true });
        </script>
        """)

    target_point = {
        "x": 20,
        "y": 40,
    }

    touch_chain \
        .pointer_move(target_point["x"], target_point["y"]) \
        .perform()

    events = get_events(session)
    assert len(events) == 1

    assert events[0]["type"] == "pointermove"
    assert events[0]["pageX"] == 20
    assert events[0]["pageY"] == 40
```

I tried with Chrome and it fails as well, but with Safari the test is passing as expected.

I checked if we maybe miss to actually synthesize the event but I can say that we call into `win.windowUtils.sendTouchEvent()` as usual and the arguments are correct.

Masayuki, may you have an idea what's wrong in that case? Why don't we get a `pointermove` event? Using an input source type of `mouse` the test works fine. Could there be a bug in `sendTouchEvent()`?

Note that when I add further actions like the following it starts to work, but a `pointer_down()` is necessary:

```
        touch_chain \
            .pointer_move(target_point["x"], target_point["y"]) \
            .pointer_down(button=0) \
            .pointer_move(10, 10) \
            .perform()
```
The following WebDriver test fails in Firefox because not a single `pointermove` event is recognized (and added to the events list):

```
def test_move_to_position(session, inline, touch_chain):
    session.url = inline("""
        <script>
          var allEvents = { events: [] };
          window.addEventListener("pointermove", ev => {
            allEvents.events.push({
                "type": event.type,
                "pageX": event.pageX,
                "pageY": event.pageY,
            });
          }, { once: true });
        </script>
        """)

    target_point = {
        "x": 20,
        "y": 40,
    }

    touch_chain \
        .pointer_move(target_point["x"], target_point["y"]) \
        .perform()

    events = get_events(session)
    assert len(events) == 1

    assert events[0]["type"] == "pointermove"
    assert events[0]["pageX"] == 20
    assert events[0]["pageY"] == 40
```

I tried with Chrome and it fails as well, but with Safari the test is passing as expected.

I checked if we maybe miss to actually synthesize the event but I can say that we call into `win.windowUtils.sendTouchEvent()` as usual and the arguments are correct.

Masayuki, may you have an idea what's wrong in that case? Why don't we get a `pointermove` event? Using an input source type of `mouse` the test works fine. Could there be a bug in `sendTouchEvent()`?

Note that when I add a pointer down action before like the following it starts to work:

```
        touch_chain \
            .pointer_down(button=0) \
            .pointer_move(target_point["x"], target_point["y"]) \
            .perform()
```

I assume it should not be required to send a pointer down first before being able to receive pointer move events.

Back to Bug 1947721 Comment 0