Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8199 closed bug (fixed)

_mouseDestroy keeps mousemove and mouseup events bound

Reported by: paulscheltema@… 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);

},

Change History (3)

comment:1 Changed 5 years ago by Scott González

  • Resolution set to fixed
  • Status changed from new to closed

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

Changeset: 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d

comment:2 Changed 5 years ago by Scott González

Mouse: Unbind events bound to document on destroy. Fixes #8199 - _mouseDestroy keeps mousemove and mouseup events bound. (cherry picked from commit 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d)

Changeset: a76366f8fc731ec6946d9f6940c8a03040e31d23

comment:3 Changed 5 years ago by scottgonzalez

  • Milestone changed from 1.9 to 1.8.19
Note: See TracTickets for help on using tickets.