Opened 12 years ago

Closed 12 years ago

#10593 closed defect (wontfix)

dijit.Tooltip open() fails if no DOMNode passed in

Reported by: ebeslagic Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:


In version 1.4.0, dijit.Tooltip's open() method fails. When using either compressed or uncompressed version from CDN and trying to execute something like dijit.byId('test_tooltip').open(); the error message is: "No match found"

If I switch to anything from 1.1.1 to 1.3.2, this code works fine. See test case on:

A working version can be seen here:

To test, click on the "fire" link - it fails in 1.4.0 but works in all other tested versions.

Test code listing:

	djConfig="parseOnLoad: true,isDebug: true" 
<script type="text/javascript">
	function fire() {

<body class="tundra">
<div style="padding:2em">
	<span id="tooltip_anchor">Some text</span> <-- moving mouse over this always works

<div style="padding:2em">
	<a href="javascript:fire()">Fire tooltip</a> <-- clicking this fails in 1.4.0<br/>

>Please enter your valid E-mail address</span>



Change History (3)

comment:1 Changed 12 years ago by bill

Summary: dijit.Tooltip open() method brokendijit.Tooltip open() fails if no DOMNode passed in

In general you shouldn't be calling the open() method, as dijit.showTooltip() is more appropriate when you want to manually display a tooltip.

As for your test case, open() takes a target DOMNode attribute and that has always been documented (even in 1.3). There was an undocumented feature that calling open() w/out an argument would open the tooltip on the first registered conectId (or in your test case the only registered connectId).

Can you call dijit.showTooltip("Please enter e-mail", dojo.byId("tooltip_anchor") or call open w/the right parameter (dojo.byId("tooltip_anchor"))?

comment:2 Changed 12 years ago by ebeslagic

Bill, thanks much for the follow-up. The suggestion worked well in 1.4.0:

dijit.showTooltip("new text?", dojo.byId("tooltip_anchor"));

Indeed I must have originally missed how to properly open a tooltip since 1.2, but, it was frustrating to experience an effect of version differences after hours of troubleshooting (at least hours for a novice like me.) I'm guessing that this undocumented feature was purposely phased out, but I would suggest to reinstate it for sake of future compatibility.

comment:3 Changed 12 years ago by bill

Resolution: wontfix
Status: newclosed

I wouldn't say "purposefully phased out" but there I did some refactoring on Tooltip which made it troublesome to support.

I'm going to close this ticket for now, if more people get tripped up by this I'll add in something so open() without an argument works again.

Note: See TracTickets for help on using tickets.