Opened 12 years ago

Closed 12 years ago

#6271 closed defect (fixed)

Connect test: "we shouldn't see this" appears anyway

Reported by: haysmark Owned by: bill
Priority: high Milestone: 1.1
Component: Events Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

See: http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/connect.html

The button has two onClick connects assigned to it. When you click it, both connects fire. However, the alert box's message implies that the first one should not fire.

It makes sense to me that they both fire. Maybe this test needs updating?

Attachments (1)

attr.html (876 bytes) - added by bill 12 years ago.
simplified test case showing root bug w/dojo.attr()

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by sjmiles

Owner: changed from sjmiles to alex

The second tag has type dojo/connect while the third tag is dojo/method, which implies to me this is really a bug, although I don't know the actual contract of dojo/method.

I don't know about the role of the first tag (dojo/connect with no event specified).

comment:2 Changed 12 years ago by bill

Could be a parser bug, but I suspect it's due to [12899], see #6280

comment:3 Changed 12 years ago by bill

dojo.attr() connects the new function but doesn't disconnect the old function. See attr.html attached test case. Tested on IE6, FF3/mac and safari3.1 (mac)

Changed 12 years ago by bill

Attachment: attr.html added

simplified test case showing root bug w/dojo.attr()

comment:4 Changed 12 years ago by bill

Hmm, looking at parser.js it seems that regardless of the order of the script tags in the markup, the parser will first instantiate the widget (overriding onClick with the one defined by <script type="dojo/method">), and then do the connect specified in the <script type="dojo/connect"> tag.

So I think the test is invalid now (ie, testing something we don't support).

I moved the dojo.attr() problem listed above (which seems unrelated) to bug #6310.

comment:5 Changed 12 years ago by bill

Milestone: 1.1
Owner: changed from alex to bill
Status: newassigned

comment:6 Changed 12 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [13208]) Remove connect.html, which is testing something that isn't supported. General <script type="dojo/method"> and <script type="dojo/connect"> tests are in parser.html. Fixes #6271

Note: See TracTickets for help on using tickets.