Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Swipe event: Trigger only one event per mouse sequence and let it bubble #6946

Closed
wants to merge 6 commits into from

Conversation

gabrielschulhof
Copy link

The element to which a mousedown handler is attached by the swipe setup() code
takes ownership of the next swipe event. This means that, if the same mousedown
event triggers other swipe setup() -attached mousedown handlers as it bubbles,
the subsequent ones will bail. Thus, if a swipe event results from the mousedown
then such a swipe event will be triggered on the deepest element with an
attached swipe handler, and it will be allowed to bubble from there. This
provides the tools that developers can use to avoid scenarios such as the one
mentioned in the referenced issue.

Fixes gh-6262

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.14%) when pulling 2ba7d5b on 6262-only-one-swipe-event into cfc1195 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.29%) when pulling 65eda5f on 6262-only-one-swipe-event into cfc1195 on master.

Gabriel Schulhof added 6 commits January 21, 2014 08:08
The element to which a mousedown handler is attached by the swipe setup() code
takes ownership of the next swipe event. This means that, if the same mousedown
event triggers other swipe setup() -attached mousedown handlers as it bubbles,
the subsequent ones will bail. Thus, if a swipe event results from the mousedown
then such a swipe event will be triggered on the deepest element with an
attached swipe handler, and it will be allowed to bubble from there. This
provides the tools that developers can use to avoid scenarios such as the one
mentioned in the referenced issue.

Fixes gh-6262
@arschmitz
Copy link
Contributor

i think this looks good now just make sure to squash 👍

@gabrielschulhof gabrielschulhof deleted the 6262-only-one-swipe-event branch January 21, 2014 22:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Event bubbling issue with swipe gesture
3 participants