Author: A.Skokov
Date: 2007-06-13 06:38:45 -0400 (Wed, 13 Jun 2007)
New Revision: 1150
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-61
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-13
09:11:12 UTC (rev 1149)
+++
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-13
10:38:45 UTC (rev 1150)
@@ -201,8 +201,8 @@
this.initialized = true;
}
if (this.active) {
- this.wasScroll = false;
- this.wasBlur = false;
+ this.wasScroll = false;
+ this.wasBlur = false;
switch (event.keyCode) {
case Event.KEY_TAB:
case Event.KEY_RETURN:
@@ -212,6 +212,9 @@
this.hide();
this.active = false;
Event.stop(event);
+ if (this.isOpera) {
+ this.element.focus();
+ }
return;
case Event.KEY_LEFT:
case Event.KEY_RIGHT:
@@ -361,14 +364,14 @@
LOG.debug("Scroll = " + scroll.scrollTop
+ " , reallOffset= " + realOffset
+ " scrollHeight= " + scroll.offsetHeight);
-
- var entryOffsetHeight;
+
+ var entryOffsetHeight;
if ("SAFARI" == RichFaces.navigatorType()) {
var tdElement = document.getElementsByClassName("dr-sb-cell-padding",
item)[0];
entryOffsetHeight = tdElement.offsetTop + tdElement.offsetHeight;
} else
entryOffsetHeight = entry.offsetHeight;
-
+
if (realOffset > scroll.scrollTop + scroll.clientHeight -
entryOffsetHeight) {
scroll.scrollTop = realOffset - scroll.clientHeight +
entryOffsetHeight;
} else if (realOffset < scroll.scrollTop) {
@@ -572,7 +575,7 @@
if (this.onsubmitFunction && ! this.onsubmitFunction()) {
return;
}
-
+
A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
},