You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2009/12/16 12:30:49 UTC
svn commit: r891196 -
/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
Author: lofwyr
Date: Wed Dec 16 11:30:49 2009
New Revision: 891196
URL: http://svn.apache.org/viewvc?rev=891196&view=rev
Log:
TOBAGO-832
+ Fix exception by key down, when focus is on the last and key-up when focus is on first.
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js?rev=891196&r1=891195&r2=891196&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js Wed Dec 16 11:30:49 2009
@@ -21,7 +21,7 @@
var handled = false;
var code = event.which;
- if (code == 0) {
+ if (code == 0) {
code = event.keyCode;
}
@@ -44,7 +44,7 @@
if ($(this).parent().hasClass('tobago-menu-top')) {
// nothing
} else {
- $(this).parent().prevAll('li').children('a')[0].focus();
+ $(this).parent().prevAll('li').children('a').eq(0).focus();
}
handled = true;
break;
@@ -62,7 +62,7 @@
if ($(this).parent().hasClass('tobago-menu-top')) {
$(this).next('ol').children(":nth-child(1)").children('a').focus();
} else {
- $(this).parent().nextAll('li').children('a')[0].focus();
+ $(this).parent().nextAll('li').children('a').eq(0).focus();
}
handled = true;
break;