You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Helmut Swaczinna (JIRA)" <de...@myfaces.apache.org> on 2011/03/18 13:18:30 UTC
[jira] Created: (TOBAGO-981) Infinite loop in tobago-menu.js
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
[jira] Updated: (TOBAGO-981) Infinite loop in tobago-menu.js
Posted by "Helmut Swaczinna (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Helmut Swaczinna updated TOBAGO-981:
------------------------------------
Status: Patch Available (was: Open)
> 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
[jira] Commented: (TOBAGO-981) Infinite loop in tobago-menu.js
Posted by "Helmut Swaczinna (JIRA)" <de...@myfaces.apache.org>.
[ 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
[jira] Resolved: (TOBAGO-981) Infinite loop in tobago-menu.js
Posted by "Bernd Bohmann (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bernd Bohmann resolved TOBAGO-981.
----------------------------------
Resolution: Fixed
> 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
> Assignee: Bernd Bohmann
> Priority: Minor
> Fix For: 1.0.36
>
>
> When all items of a menu are disabled, 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