document.createTouch does not match the specification; requires explicit clientX/clientY

NEW
Unassigned

Status

()

Core
DOM: Events
5 years ago
4 years ago

People

(Reporter: mbrubeck, Unassigned)

Tracking

({compat})

Trunk
compat
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

5 years ago
Gecko's implementation of document.createTouch is not compatible with the Touch Events v1 spec, or the behavior of other browser.

This causes a failure in the createTouch test at:
http://w3c-test.org/webevents/tests/touch-events-v1/submissions/Nokia/create-touch-touchlist.html
Details?  Which part of the test do we fail, and how does our behavior differ from other UAs?
(Reporter)

Comment 2

5 years ago
Gecko expects separate clientX and clientY arguments to createTouch.  These arguments are not present in other browsers.  Other browsers set the clientX and clientY properties based on the pageX and pageY arguments.

The test failure is:

"assert_equals: touch.clientX is touch.pageX - window.pageXOffset. expected 15 but got 0"
Summary: document.createTouch does not match the specification → document.createTouch does not match the specification; requires explicit clientX/clientY
Ah, I see.  So just a matter of ripping out the client* from the _middle_ of the signature (and hoping no one is using it, fun) and computing them on the back end, ok....

The spec does not define how the clientX and clientY are computed.  It probably needs to do that, if it's testing something about it.
Duplicate of this bug: 815420

Comment 5

5 years ago
When this stuff was implemented, we followed the spec.
You need to log in before you can comment on or make changes to this bug.