Ticket #8199 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

_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:
Blocking: Blocked by:

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

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

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

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

Changeset: 94c6f9ec84acc4c01f2dc16c009e2cf7a0fdbc5d

comment:2 Changed 3 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 3 years ago by scott.gonzalez

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