Opened 7 years ago

Closed 7 years ago

#18765 closed defect (invalid)

Mover does not call this.destroy() in onMouseUp

Reported by: greenkarmic Owned by: greenkarmic
Priority: undecided Milestone: tbd
Component: DnD Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:


dojo.dnd.Moveable does "new this.mover" each time it's onDragDetected is called, which creates a new dojo.dnd.Mover. Mover creates a bunch of mouse event handlers in the constructor. Mover onMouseUp is supposed to call destroy to clear all these events, but it doesn't (at least not on Desktop). This means that each time Moveable onDragDetected is called, you end up with more and more event handlers for Mover.

Change History (2)

comment:1 Changed 7 years ago by bill

Owner: set to greenkarmic
Status: newpending

On both Chrome desktop and Firefox desktop I'm showing that Mover.onMouseUp() calls Mover.destroy(), which removes the event handlers. That's not happening for you? It's this code:

if(has("webkit") && has("mac") && this.mouseButton == 2 ?
		e.button == 0 : this.mouseButton == e.button){ // TODO Should condition be met for touch devices, too?

PS: This code is a mess. Since Moveable calls new this.mover, Moveable should be the one to call destroy this.mover. But, AFAICT it's working.

comment:2 Changed 7 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.