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

bug of unbinding swipeleft/swiperight handler #7351

Closed
egana opened this issue Apr 27, 2014 · 0 comments
Closed

bug of unbinding swipeleft/swiperight handler #7351

egana opened this issue Apr 27, 2014 · 0 comments
Assignees
Milestone

Comments

@egana
Copy link

egana commented Apr 27, 2014

When I bind both 'swipeleft' and 'swiperight' handler to the same element and then unbind the 'swiperight' handler, 'swipeleft' event handler is no longer fired.

Test:
http://jsbin.com/acIRUBo/66/edit
In the above test page, first 'swipeleft' and 'swiperight' handler is bound to #target element.
By the clicking the button, 'swiperight' handler is unbound. Since 'swipeleft' handler is not unbound, you expect that 'swipeleft' handler is still fired, but actually it's not fired anymore.

In fact, at the following line, when teardown 'swiperight' event handler, all the 'swipe' handler is unbound.
https://github.com/jquery/jquery-mobile/blob/18f872d0174e418c0ac1433267a1e9ea13a4263a/js/events/touch.js#L325

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants