Opened 10 years ago
Closed 10 years ago
#12665 closed defect (fixed)
Tooltip: doesn't work on drop down Menus, or inside of Titlepane
Reported by: | IngoWinter | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dijit | Version: | 1.6.0 |
Keywords: | tooltip, titlepane | Cc: | |
Blocked By: | Blocking: |
Description
Doesn't work in any Browser.
<!doctype html> <head> <meta charset="utf-8"> <title>dojo Tooltip Demo</title> <meta name="description" content=""> <meta name="author" content=""> <link rel="stylesheet" href="reset.css"> <link rel="stylesheet" href="style.css"> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djConfig="parseOnLoad: true"></script> <script> dojo.require("dijit.Tooltip"); dojo.require("dijit.TitlePane"); </script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css" /> </head> <body class="claro"> <div id="website"> <h1>dojo Tooltip Demo</h1> <div id="tp2" dojoType="dijit.TitlePane" title="I'm a TitlePane Too"> <img src="tooltip_trigger.gif" alt="" id="tooltip_trigger" /> <span dojoType="dijit.Tooltip" connectId="tooltip_trigger">Krass geiler Tooltip</span> </div> </div> </body> </html>
Change History (3)
comment:1 Changed 10 years ago by
Milestone: | tbd → 2.0 |
---|---|
Summary: | Tooltips don't work inside of Titlepanes → Tooltip: doesn't work inside of Titlepane |
comment:2 Changed 10 years ago by
Milestone: | 2.0 → 1.7 |
---|---|
Owner: | set to bill |
Status: | new → assigned |
Summary: | Tooltip: doesn't work inside of Titlepane → Tooltip: doesn't work on drop down Menus, or inside of Titlepane |
Hmm, I just realized the problem is more severe in that tooltips don't create correctly when attached to a drop down menu from a DropDownButton, since they look for the attach node at a time when it's not attached to <body>.
So I changed my mind and will do this for 1.7.
Note: See
TracTickets for help on using
tickets.
Ah right, it's because the Tooltip._setConnectIdAttr() code executes before the TitlePane.containerNode has been inserted into the DOM, andsoit can't find the <img> node via dojo.byId("tooltip_trigger").
The right thing to do is to defer the tooltip's connect code until the Tooltip.startup() call, but that might break existing apps which aren't calling Tooltip.startup(). Could run the code twice although that's ineffecient.
As a workaround you can call this after requiring Tooltip: