Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1649 closed defect (fixed)

DND breaks controller/selector/events

Reported by: ilia Owned by: bill
Priority: high Milestone:
Component: DnD Version: 0.4
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by ilia)

See treeV3/dndselector.html

Move or try moving a node, then click on it. Event handler will not work, while it should (try other nodes).

Attachments (1)

HtmlDragAndDrop.js.patch (1.1 KB) - added by swessels@… 13 years ago.
Patch works in IE7, FF2.0

Download all attachments as: .zip

Change History (14)

comment:1 Changed 13 years ago by ilia

Description: modified (diff)
Priority: highhighest
severity: criticalblocker

comment:2 Changed 13 years ago by ilia

P.S The problem looks not tree-specific at all.

comment:3 Changed 13 years ago by dylan

Milestone: 0.40.4.1
Version: 0.40.3

comment:4 Changed 13 years ago by ilia

Milestone: 0.4.10.4
Owner: changed from psowden to bill
Version: 0.30.4

The cause of the problem is this code:

squelchOnClick: function(e){
		// squelch this onClick() event because it's the result of a drag (it's not a real click)
		dojo.event.browser.stopEvent(e);

		// disconnect after a short delay to prevent "Null argument to unrollAdvice()" warning
		dojo.lang.setTimeout(function() {
				dojo.event.disconnect(this.domNode, "onclick", this, "squelchOnClick");
			},50);
	},

It squelches all onclicks and doesn't really disconnect. I think we can remove setTimeout, then it disconnects, but anyway consumes first click.

I couldn't find out how it *should* work, so can't fix it. Maybe add additional disconnect conditions..

The bug is: all onclick events are blocked after dnd attempt.

comment:5 Changed 13 years ago by bill

Milestone: 0.40.4.1

Hmm, I can take a look at this for 0.4.1. I'm certainly not going to hold up the 0.4 release for it. Last time I checked that code was working correctly; if you mouse down, move the mouse, and then mouse up (a drag operation), it stops the onClick event from firing on said node. It shouldn't block the onClick event if you don't move the mouse while the button is depressed.

comment:6 Changed 13 years ago by ilia

Resolution: fixed
Status: newclosed

Ok, I tested in FF 1.5 under linux, IE 6 under windows.

comment:7 Changed 13 years ago by ilia

Resolution: fixed
Status: closedreopened

Ouch closed on mistake.

Changed 13 years ago by swessels@…

Attachment: HtmlDragAndDrop.js.patch added

Patch works in IE7, FF2.0

comment:8 Changed 13 years ago by bill

Resolution: fixed
Status: reopenedclosed

(In [6315]) Fixes #1649

comment:9 Changed 13 years ago by guest

Resolution: fixed
Status: closedreopened

mmm I try but it didn't work... (firefox 2.0)... besides ¿who really use firefox 2.0 or Explorer 7?

comment:10 Changed 13 years ago by guest

It works in firefox and explorer 6... sorry...

comment:11 Changed 13 years ago by dylan

Milestone: 0.4.10.4.2
Priority: highestnormal
severity: blockermajor

comment:12 Changed 13 years ago by bill

Milestone: 0.4.20.4.1
Resolution: fixed
Status: reopenedclosed

This is working. (The guest above said "It works in firefox and explorer 6" plus I just tested it myself in FF2.0.)

comment:13 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.