I have a tree set up with noLink: true, and each node contains a bit of information, including a hyperlink.
Clicking this hyperlink doesn't do anything, though - the click is 'stolen' by Dynatree.
In _onClick:
this._userActivate();
var aTag = this.span.getElementsByTagName("a");
if (aTag[0]) {
// issue 154, 313
if (!(BROWSER.msie && parseInt(BROWSER.version, 10) < 9)) {
aTag[0].focus();
}
} else {
// 'noLink' option was set
return true;
}
I suspect what you're trying to do, is cancel the click if noLinkis true, that is, check if the title is a span or an anchor? In that case, wouldn't it be better to do var aTag = $(this.span).children("a.dynatree-title"); rather than var aTag = this.span.getElementsByTagName("a");? That seems to solve the problem for me, at least.
I have a tree set up with
noLink: true
, and each node contains a bit of information, including a hyperlink. Clicking this hyperlink doesn't do anything, though - the click is 'stolen' by Dynatree.In
_onClick
:I suspect what you're trying to do, is cancel the click if
noLink
is true, that is, check if the title is a span or an anchor? In that case, wouldn't it be better to dovar aTag = $(this.span).children("a.dynatree-title");
rather thanvar aTag = this.span.getElementsByTagName("a");
? That seems to solve the problem for me, at least.