Commit Graph

8 Commits

Author SHA1 Message Date
Daniel Freedman
811f76680c Remove closures holding element references after mouseup/touchend
With tests

Fixes #3083
2015-11-25 10:27:17 -08:00
Daniel Freedman
96e4bfa5b1 Fix Gestures when using SD polyfill
Test with SD polyfill and native ShadowDOM
Requires webcomponents/webcomponentsjs#434

Fixes #2641
2015-11-04 14:09:49 -08:00
Daniel Freedman
bbc3b57220 Automatically filter mouseevents without the left mouse button
Keep test compatibility by treating undefined button values as left mouse button

Fixes #2166
2015-07-29 10:38:49 -07:00
Daniel Freedman
a43471fe42 Dispatch gesture to the original native event target
Fixes #1921

Update tests with new event target expectations

Incorporate structure from http://jsbin.com/lohepic/edit?html,console,output
2015-07-01 13:55:43 -07:00
Daniel Freedman
11869f2f04 Allow user prevention of tap and track gestures from down
New API: `event.detail.prevent('tap')` and `event.detail.prevent('track')`
Fixes #1823

Forward `preventDefault` from gesture events to source events

`gesture.preventDefault()` is equivalent to
`gesture.detail.sourceEvent.preventDefault()`

Remove `preventDefault()` on mousemove in track, user must use
`track.preventDefault()` to hide user selection or use `user-select:none`
Fixes #1824
2015-06-11 17:20:56 -07:00
Daniel Freedman
4616576efe Add unlisten function
Keep generated event handlers, attach with WeakMap to host element
Add tests for events

Support multi-dispatch unlisten (must give event name and handler function
name).

Fixes #1639
2015-06-08 10:34:24 -07:00
Daniel Freedman
c8cde9bea6 Refactor events feature
Allow behaviors to easily override event listener creation

Expose a Behavior

Use a coarse mouse on/off feature for handling synthetic mouse events and ghost clicks

Implement all in the burndown list

Add a smoke test

only handle one finger with touchevents

Make sure track state can be "start" for mouse

Minor fix for touchevent single-finger check

bolt basic gestures onto core

add tests for gesture private data tracking
2015-05-05 16:44:25 -07:00
frankiefu
69fd257f34 add simple tests for gestures 2015-03-18 18:08:36 -07:00