Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4674 closed defect (fixed)

Cannot dynamically add tooltips to dojo widgets or plain div tags

Reported by: guest Owned by:
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Tooltip dynamic javascript firbug Cc:
Blocked By: Blocking:

Description

As stated in the comments at http://dojotoolkit.org/book/dojo-porting-guide-0-4-x-0-9/widgets/tooltip

Adding a tooltip with JS does not work for me

From firebug, most dojo/dijit operations work.

However

t=new dijit.Tooltip({label:"foo", connectId:"bar"});

does absolutely nothing, even when an HTML input element or dijit called "bar" exists: t remains undefined. This is still true if I put t in the local scope.

I have required dijit.Tooltip


I've attached a simple test-case that uses addOnLoad to try to do the same thing. That doesn't work either, but gives the following error instead. The actions above have consequences as described.

Error: this.srcNodeRef has no properties http://my.host/dojo/dojo/dojo.js Line 141

Attachments (1)

tooltip.html (1.1 KB) - added by guest 12 years ago.
Example of problem

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by guest

Attachment: tooltip.html added

Example of problem

comment:1 in reply to:  description Changed 12 years ago by guest

I'm using Iceweasel 2.0.0.6 with firebug 1.05 on Debian 4.0.

comment:2 Changed 12 years ago by guest

invalid

var t = new dijit.Tooltip({label:'foo', connectId:'bar'}, document.createElement("div"));
should work.
Regards,

Nicola

comment:3 Changed 12 years ago by guest

That's got it, thanks.

comment:4 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [10974]) Fix programmatically created tooltips w/out srcNodeRef. Fixes #4674.

comment:5 Changed 12 years ago by bill

Milestone: 1.0
Note: See TracTickets for help on using tickets.