Author: A.Skokov
Date: 2007-03-06 04:53:02 -0500 (Tue, 06 Mar 2007)
New Revision: 18
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
SuggestionBox position in IE fixed
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-03-06
05:11:00 UTC (rev 17)
+++
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-03-06
09:53:02 UTC (rev 18)
@@ -466,7 +466,7 @@
var targetStyle = {};
/*
http://jira.exadel.com/browse/RFA-236
-
+
var pos = Exadel.SmartPosition.getPosition(this.source, this.target, options);
if (RichFaces.navigatorType() == "MSIE") {
@@ -494,7 +494,7 @@
},
calcOffsets : function(element) {
- var x = 0,y = 0,ret = new Object(),prevPos;
+ var x = 0,y = 0,ret = new Object(),prevPos, pos;
if (element.currentStyle) {
prevPos = element.currentStyle['position'];
@@ -504,8 +504,10 @@
//prevPos = element.currentStyle.position;
element.style.position = "absolute";
- y = (Number(Position.cumulativeOffset(element)[1]) + element.clientHeight);
- x = Number(element.offsetLeft);
+
+ pos = Position.cumulativeOffset(element);
+ y = Number(pos[1] + element.clientHeight);
+ x = Number(pos[0]);
element.style.position = prevPos;
ret["x"] = x;
ret["y"] = y;
@@ -521,7 +523,6 @@
return str;
},
-
calcHeight: function() {
return this.options.height == "auto" ? ""
:this.options.height;
},