#1211 closed defect (fixed)
Dynamically-created Tooltips have no content.
Reported by: | Owned by: | liucougar | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Somewhere over the last month or so, dynamic creation of tool tips got broken. You just get a tiny tell-tale without any content. Here's a test case:
<html> <head>
<title>Dojo Dynamic Tooltip Test</title>
<script type="text/javascript">
var djConfig = {isDebug: true, debugAtAllCosts: false };
</script>
<script type="text/javascript" src="../../dojo.js"></script> <script type="text/javascript">
dojo.require("dojo.widget.Tooltip");
</script>
<script type="text/javascript">
var tt = null; dojo.addOnLoad(function() {
tt = dojo.widget.createWidget("Tooltip", {
connectId: "one", caption: "dynamic", toggle: "fade", hideDelay: 0
});
});
</script>
</head>
<body>
<h1>Tooltip test</h1> <p>Mouse-over the item below to test dynamic tooltip:</p> <p>
<span id="one" class="tt">text</span>
</p>
</body> </html>
I've debugged it as far as createWidget() in Parse.js. At the end of that method, it clobbers the content:
if (notRef) {
if (widgetArray[0].domNode.parentNode) {
widgetArray[0].domNode.parentNode.removeChild(widgetArray[0].domNode);
}
}
Attachments (1)
Change History (4)
comment:1 Changed 14 years ago by
Milestone: | → 0.4 |
---|
Changed 14 years ago by
Attachment: | 1211.patch added |
---|
I talked to Cougar about this today. Basically, Tooltip needs to be modified to extend PopupContainer?, and then to do a createWidget("ContentPane?"), rather than vice-versa like it is now.
Or perhaps the template for Tooltip could be something like
and then inside postCreate() you could call
(except the above call somehow has to set "this" as the Content Pane's parent widget.)