Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

_mouseDestroy not implemented #124

Closed
chumanfu opened this Issue · 2 comments

2 participants

@chumanfu

Hi

I have a problem with jquery ui selectable. If I make UL which is scrollable selectable and then called selectable('destroy') the item no longer scrolls.

If I add this to Touch Punch it works:

var mouseProto = $.ui.mouse.prototype,
_mouseInit = mouseProto._mouseInit,
_mouseDestroy = mouseProto._mouseDestroy,
touchHandled;

mouseProto._mouseDestroy = function () {

var self = this;

// Un-Delegate the touch handlers to the widget's element
self.element
  .unbind('touchstart', $.proxy(self, '_touchStart'))
  .unbind('touchmove', $.proxy(self, '_touchMove'))
  .unbind('touchend', $.proxy(self, '_touchEnd'));

// Call the original $.ui.mouse destroy method
_mouseDestroy.call(self);

};

Is there any reason why _mouseDestroy has never been implemented?
Is my code above okay to use?

Cheers

Chris

@furf furf self-assigned this
@furf
Owner

The code looks good. I am doing some housecleaning this week, so I'll see about possible implementation.

@furf furf referenced this issue from a commit
HUGE | furf Handle touch cleanup when widget is destroyed 8f7559b
@furf
Owner

Fixed in 0.2.3. Thanks!

@furf furf closed this
@heiskr heiskr referenced this issue from a commit in heiskr/jquery-ui-touch-punch
HUGE | furf Handle touch cleanup when widget is destroyed 7db67fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.