Author: nbelaevski
Date: 2008-05-12 15:51:17 -0400 (Mon, 12 May 2008)
New Revision: 8534
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-3352
Modified:
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
---
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-05-12
18:48:29 UTC (rev 8533)
+++
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-05-12
19:51:17 UTC (rev 8534)
@@ -375,8 +375,17 @@
* 1000);
},
+ _findTr: function(event) {
+ var elt = Event.element(event);
+ while (elt && (!elt.tagName || elt.tagName.toUpperCase() != 'TR'))
{
+ elt = elt.parentNode;
+ }
+
+ return elt;
+ },
+
onHover: function(event) {
- var element = Event.findElement(event, 'TR');
+ var element = this._findTr(event);//Event.findElement(event, 'TR');
if (!this.skipHover) {
if (this.index != element.autocompleteIndex) {
this.index = element.autocompleteIndex;
@@ -395,14 +404,14 @@
onClick: function(event) {
this.wasScroll = false;
this.wasBlur = false;
- var element = Event.findElement(event, 'TR');
+ var element = this._findTr(event);//Event.findElement(event, 'TR');
this.index = element.autocompleteIndex;
this.selectEntry(event);
this.hide();
},
onMouseOut: function(event) {
- var element = Event.findElement(event, 'TR');
+ var element = this._findTr(event);//Event.findElement(event, 'TR');
Event.stopObserving(element, "mousemove", this.onHover);
},