Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14833 closed defect (invalid)

Recreating dijit.tooltip not working if position is defined

Reported by: eX0du5 Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:



I noticed a problem with the re-creation of my dijit.tooltip with the code below:

<link rel="stylesheet" type="text/css" href="">
<script src=""
                data-dojo-config="isDebug: true, parseOnLoad: true">
<script type="text/javascript">

function Create() {
	new dijit.Tooltip({
		 id: "my_tooltip",
	     connectId: ["my_anchor"],
	     position: "above",
	     label:  "test"

function Remove() {
	try {
	} catch(e) {
		console.log(e); // comes up if you click create before remove

<div style="margin: 50px;" id="my_anchor">content</div>

<button data-dojo-type="dijit.form.Button" type="button" onclick="Create()">Create</button>
<button data-dojo-type="dijit.form.Button" type="button" onclick="Remove()">Remove</button>


After recreation, the mouse over will throw an exception which is shown in firebug. If I remove the line "position: above", it works fine.

Change History (3)

comment:1 Changed 10 years ago by bill

Component: GeneralDijit
Resolution: invalid
Status: newclosed

It's invalid to try to create two tooltips, or two of anything, with the same id.

comment:2 Changed 10 years ago by eX0du5

Sorry, but why do I destroy the widget then? You first create it - tooltip works. Then you destroy it - tooltip no longer works (as expected). Then you create it again with equal ID which should work because the first one no longer exists.

comment:3 Changed 10 years ago by bill

OK, should have marked this as pending then. I'll comment in #14839.

Note: See TracTickets for help on using tickets.