New issue
Advanced search Search tips

Issue 662087 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

PointerEvents API does not supply clientX via jQuery on Windows 10 on some chrome browsers

Reported by ufabi...@googlemail.com, Nov 3 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce the problem:
  jQuery(document).bind('pointermove', function(ev) { console.log(ev.clientX); });

in the console of a Drupal 7 site. (Use simplytest.me to create a 7.51 site easily)

What is the expected behavior?
Logging the clientX property of the original event

What went wrong?
Undefined property only on Windows 10, chrome stable

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 54  Channel: stable
OS Version: 10
Flash Version: 

Hello there,

This is Fabian from Drupal, where we recently enabled pointer events via a jQuery binding.

We received bug reports (probably those 1% that have it enabled in stable) of drag and drop being broken in our latest stable release, but only on Chrome.

The strange thing is:

   It works in Firefox with the option enabled (and apparently IE 10).

The code to reproduce is:

  jQuery(document).bind('pointermove', function(ev) { console.log(ev.clientX); });

which fails with undefined property.

While obviously:

  jQuery(document).bind('pointermove', function(ev) { console.log(ev.originalEvent.clientX); });

works.

However jQuery (pretty old version though) correctly copies the event.clientX property in Firefox, but fails in Chrome. Maybe it cannot detect the mouse event inheritance somehow?

Not sure this is really a bug though, so just reporting the finding here.

Thanks,

Fabian
 
Cc: mustaq@chromium.org rbyers@chromium.org
Labels: Hotlist-Input-Dev
Owner: nzolghadr@chromium.org
Status: Assigned (was: Unconfirmed)
I believe this is a problem in that you shouldn't be binding pointer events against that jquery version that you use as it doesn't really run it's fixup on the events.

See this commit in jquery:
https://github.com/jquery/jquery-dist/commit/64d7c168c8b331cd53a3f8712e09d8c75b0e0efe
I can also confirm that it used to fail with older jQuery as this example shows but as soon as I use a newer version it works just fine. ufabianx@ would you be able to communicate with the team and get them to use a newer version of jQuery?
Unfortunately Drupal is stuck with version 1.4.4 of jQuery, some users use a jquery_update module to get at least 1.7 or 1.10.

And that is the solution to the riddle.

It is not broken for very old versions, but only between 1.7 and 1.10 and then it fails on Firefox as well. So its isolated to users of a certain additional module.

Sorry for the fuzz (we had been wondering what the problem could be) and thanks for helping to reproduce that.

Closing this bug.
I can't close the bug, so asking politely if this bug could be closed please.

And again: Thank you all so much for the support.
Status: WontFix (was: Assigned)
#5 - thank you for the update.

(And I guess Internet Explorer 10 worked because it was not pointermove, but mspointermove, if I remember correctly and I am pretty sure jQuery did not add a prefix automatically, so it probably just went through the mousemove path)

Sign in to add a comment