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

bug of unbinding swipeleft/swiperight handler  #7351

@egana

Description

@egana

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions