Skip to content

Commit

Permalink
Fix programmatically created tooltips w/out srcNodeRef. Fixes #4674.
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeese committed Oct 19, 2007
1 parent 1121855 commit dfb2b4e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Tooltip.js
Expand Up @@ -126,7 +126,9 @@ dojo.declare(
connectId: [],

postCreate: function(){
this.srcNodeRef.style.display="none";
if(this.srcNodeRef){
this.srcNodeRef.style.display = "none";
}

this._connectNodes = [];

Expand Down
8 changes: 8 additions & 0 deletions tests/test_Tooltip.html
Expand Up @@ -13,6 +13,11 @@
<script type="text/javascript">
dojo.require("dijit.Tooltip");
dojo.require("dojo.parser"); // find widgets
dojo.addOnLoad(function(){
console.log("on load func");
var tt = new dijit.Tooltip({label:"programmatically created tooltip", connectId:["programmaticTest"]});
console.log("created", tt, tt.id);
});
</script>
<style type="text/css">
@import "../../dojo/resources/dojo.css";
Expand All @@ -39,6 +44,9 @@ <h1 class="testTitle">Tooltip test</h1>
<span dojoType="dijit.Tooltip" connectId="three">tooltip on a link </span>
<p></p>

<span id="programmaticTest">this text has a programmatically created tooltip</span>
<br>

<button id="four">button</button>
<span id="btnTt" dojoType="dijit.Tooltip" connectId="four">tooltip on a button</span>

Expand Down

0 comments on commit dfb2b4e

Please sign in to comment.