-
Notifications
You must be signed in to change notification settings - Fork 158
PEP does not polyfill offsetX and offsetY properties #217
Comments
Calling |
To clarify, |
Well, they are part of the CSSOM View Module's extension to mouse events http://www.w3.org/TR/cssom-view/#extensions-to-the-mouseevent-interface so they are in an indirect way part of the standard properties of the PE interface, as that simply extends the existing mouse interface (which in most? modern browsers includes the extension from CSSOM) |
We can avoid the unnecessary overhead by using |
Need to check if the suggested polyfill above is correct. Can compare native mouse offsetX/Y with calculated values. |
WIP: No idea how to write a unit test for this, so for now it only extends the simple sample. Tested with the sample on Chrome, Firefox and Safari (all OSX) and Android 5 (BrowserStack) and iOS 9.1 (iOS Simulator). Fixes jquery-archive#217
WIP: No idea how to write a unit test for this, so for now it only extends the simple sample. Tested with the sample on Chrome, Firefox and Safari (all OSX) and Android 5 (BrowserStack) and iOS 9.1 (iOS Simulator). Fixes jquery-archive#217
WIP: No idea how to write a unit test for this, so for now it only extends the simple sample. Tested with the sample on Chrome, Firefox and Safari (all OSX) and Android 5 (BrowserStack) and iOS 9.1 (iOS Simulator). Fixes jquery-archive#217
WIP: No idea how to write a unit test for this, so for now it only extends the simple sample. Tested with the sample on Chrome, Firefox and Safari (all OSX) and Android 5 (BrowserStack) and iOS 9.1 (iOS Simulator). Fixes jquery-archive#217
WIP: No idea how to write a unit test for this, so for now it only extends the simple sample. Tested with the sample on Chrome, Firefox and Safari (all OSX) and Android 5 (BrowserStack) and iOS 9.1 (iOS Simulator). Fixes jquery-archive#217
WIP: No idea how to write a unit test for this, so for now it only extends the simple sample. Tested with the sample on Chrome, Firefox and Safari (all OSX) and Android 5 (BrowserStack) and iOS 9.1 (iOS Simulator). Fixes jquery-archive#217
Providing offsetX and offsetY would be great but it's a lot harder than it looks. Here's an example using offsetX and offsetY https://greggman.github.io/doodles/test/3d-css-and-offsetXY/3d-css-and-offsetXY.html It seems to work in Chrome and Firefox both on desktop and on mobile (and Safari via mouse events on desktop) Here's the same thing with the polyfill added https://greggman.github.io/doodles/test/3d-css-and-offsetXY/3d-css-and-offsetXY-with-polyfill.html It has 2 issues
|
PEP has now entered emeritus status at the OpenJS Foundation. This repository is now archived. |
Hi everyone,
I'm currently trying to use PEP in Chrome (version 0.3.0) for an implementation already working in IE11 using native PointerEvents and I noticed that the
offsetX
andoffsetY
properties are missing from the event.These could easily be polyfilled by using
e.offsetX = e.pageX - e.target.getBoundingClientRect().left
ande.offsetY = e.pageY - e.target.getBoundingClientRect().top
.Is this a known issue?
Thanks,
Alvin
The text was updated successfully, but these errors were encountered: