RESOLVED FIXED 56606
event.clientX/clientY is 0/0 in a click generated through a label
https://bugs.webkit.org/show_bug.cgi?id=56606
Summary event.clientX/clientY is 0/0 in a click generated through a label
Attachments
Patch (5.13 KB, patch)
2011-05-18 10:13 PDT, Erik Arvidsson
no flags
Patch: Fix test to not print coord when passing (5.51 KB, patch)
2011-05-18 10:26 PDT, Erik Arvidsson
ojan: review+
Erik Arvidsson
Comment 1 2011-05-17 16:07:34 PDT
Given a label for an input. When the user clicks the label we generate a simulated click event on the input. However, this event has all its coordinates set to 0. I have a fix for this where we use the coordinates of the underlying event for simulated clicks.
Erik Arvidsson
Comment 2 2011-05-18 10:13:25 PDT
Erik Arvidsson
Comment 3 2011-05-18 10:15:00 PDT
Emil, I know you are not yet a reviewer but since you looked at mouse coordinates recently I would appreciate if you could take a quick look at this.
Erik Arvidsson
Comment 4 2011-05-18 10:26:56 PDT
Created attachment 93931 [details] Patch: Fix test to not print coord when passing
Ojan Vafai
Comment 5 2011-05-18 10:33:49 PDT
Comment on attachment 93931 [details] Patch: Fix test to not print coord when passing View in context: https://bugs.webkit.org/attachment.cgi?id=93931&action=review > LayoutTests/fast/events/simulated-click-coords.html:6 > +<p>Ensure that simulated click uses the original mouse coordinates.</p> Ensure that simulated click on label elements uses the original mouse coordinates.
Emil A Eklund
Comment 6 2011-05-18 10:39:51 PDT
LGTM. I'd like to see a test where the label is inside a scrolled container though, just to make sure all the coordinates are calculated correctly.
Erik Arvidsson
Comment 7 2011-05-18 10:47:38 PDT
Note You need to log in before you can comment on or make changes to this bug.