[
https://issues.apache.org/jira/browse/TOBAGO-981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008414#comment-13008414
]
Helmut Swaczinna commented on TOBAGO-981:
-----------------------------------------
I've changed nextItem() to solve the problem:
Tobago.Menu.Item.prototype.nextItem = function(start, offset) {
var i = start + offset;
while (!(this.subItems[i] && ! this.subItems[i].disabled)) {
if (offset > 0) {
if (i >= this.subItems.length) {
i = -1;
}
}
else {
if (i < 0) {
i = this.subItems.length;
}
}
i += offset;
if (i == start + offset) {
return false;
}
}
var j = Tobago.element(this.subItems[i].id).childNodes.length;
var span = this.subItems[i].getLabelTag();
if (span) {
this.subItems[i].hover = true;
span.focus();
return this.subItems[i];
}
return false;
};
> Infinite loop in tobago-menu.js
> -------------------------------
>
> Key: TOBAGO-981
> URL: https://issues.apache.org/jira/browse/TOBAGO-981
> Project: MyFaces Tobago
> Issue Type: Bug
> Components: Themes
> Affects Versions: 1.0.33
> Environment: All
> Reporter: Helmut Swaczinna
> Priority: Minor
>
> When all items of a menu are disbaled, the loop in tobago-menu.js in
> nextItem() is infinite if start == -1.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira