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 2012/11/21 20:41:12 UTC
svn commit: r1412247 -
/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js
Author: lofwyr
Date: Wed Nov 21 19:41:11 2012
New Revision: 1412247
URL: http://svn.apache.org/viewvc?rev=1412247&view=rev
Log:
TOBAGO-1200: Input-suggest-list: can't do navigation with the cursor keys in IE8
Modified:
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js?rev=1412247&r1=1412246&r2=1412247&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-in.js Wed Nov 21 19:41:11 2012
@@ -58,7 +58,7 @@ Tobago.AutocompleterAjax.prototype.doChe
var input = Tobago.element(this.id);
var code = event.which;
- if (code == 0) {
+ if (code == null || code == 0) {
code = event.keyCode;
}
@@ -71,14 +71,10 @@ Tobago.AutocompleterAjax.prototype.doChe
return false;
case 40: // cursor down
this.registerBodyEvent();
- var div = Tobago.element(this.id + '_suggestDiv');
- if (div) {
- div.style.display = 'block';
- try {
- // focus() on not visible elements breaks IE
- div.firstChild.firstChild.firstChild.focus();
- } catch (ex) {
- }
+ var div = jQuery(Tobago.Utils.escapeClientId(this.id + '_suggestDiv'));
+ if (div.length != 0) {
+ div.show();
+ div.find("a:first").focus();
return false;
}
}
@@ -271,7 +267,7 @@ Tobago.AutocompleterAjax.prototype.sugge
var li = Tobago.element(event).parentNode;
var code = event.which;
- if (code == 0) {
+ if (code == null || code == 0) {
code = event.keyCode;
}