mootools / mootools-core

MooTools Core Repository
https://mootools.net
2.65k stars 507 forks source link

Better recognition of pointer events #2745

Open si13b opened 8 years ago

si13b commented 8 years ago

http://caniuse.com/#feat=pointer http://www.w3.org/TR/pointerevents/

At present when you attempt to add an event handler for a pointer event, it is not registered correctly, since it is not recognised as a native event:

   myElement.addEvent('pointerdown', myFunc); // myFunc is never called on pointer down

I intend to implement this myself, which will pave the way for adding pointer support to mootools.more => Drag and Drag.Move, which I also hope to implement.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

SergioCrisostomo commented 8 years ago

Interesting. Have you tried to implement it already? Not sure how we can make cross-browser properties like tilt and pressure be consistent.

si13b commented 8 years ago

So far I've just made sure that it's recognised as a native event in Element.Event.js and ensured that the page/client objects are passed through in DOMEvent.js. Is there anything else that I should be considering?

si13b commented 8 years ago

I noticed that DOMEvent acts as some kind of meta-event or decorator. Should I be setting tilt/pressure etc as properties directly, or can people simply access it via the native event i.e. the DOMEvent.event property?