Skip to main content

Search and Top Navigation

#8199 closed bug (fixed)

Opened March 16, 2012 10:51AM UTC

Closed March 19, 2012 01:47PM UTC

Last modified March 19, 2012 01:48PM UTC

_mouseDestroy keeps mousemove and mouseup events bound

Reported by: paulscheltema@gmail.com Owned by:
Priority: minor Milestone: 1.8.19
Component: ui.mouse Version: 1.8.18
Keywords: Cc:
Blocked by: Blocking:
Description

When you create a draggable object and have the draggable be destroyed while dragging, while still holding down the mouse. The mousemove events keep firing.

This is bacsause the ui.draggable.destroy method calls the _mouseDestroy()

and the _mouseDestroy() doesnt unbind the mousemove and mouseup event handlers.

To fix this add the unbind of those 2 events to the _mouseDestroy method, see below:

_mouseDestroy: function() {

this.element.unbind('.'+this.widgetName);

$(document)

.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)

.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);

},

Attachments (0)
Change History (3)

Changed March 19, 2012 01:47PM UTC by Scott González comment:1

resolution: → fixed
status: newclosed

Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound.

Changeset: 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d

Changed March 19, 2012 01:48PM UTC by Scott González comment:2

Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound.

(cherry picked from commit 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d)

Changeset: a76366f8fc731ec6946d9f6940c8a03040e31d23

Changed March 19, 2012 01:48PM UTC by scottgonzalez comment:3

milestone: 1.91.8.19