[richfaces-svn-commits] JBoss Rich Faces SVN: r5447 - trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jan 17 07:39:36 EST 2008


Author: sergeyhalipov
Date: 2008-01-17 07:39:36 -0500 (Thu, 17 Jan 2008)
New Revision: 5447

Modified:
   trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
http://jira.jboss.com/jira/browse/RF-1485

Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js	2008-01-17 12:15:08 UTC (rev 5446)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js	2008-01-17 12:39:36 UTC (rev 5447)
@@ -407,10 +407,10 @@
 		while (parentNode && !/^body$/i.test(parentNode.tagName)) {
 			if (/^absolute$/i.test(Richfaces.getComputedStyle(parentNode, "position"))) {
 				if (parentNode.scrollLeft) {
-					this.scrollDelta[0] += parentNode.scrollLeft;
+					this.scrollDelta[0] = parentNode.scrollLeft;
 				}
 				if (parentNode.scrollTop) {
-					this.scrollDelta[1] += parentNode.scrollTop;
+					this.scrollDelta[1] = parentNode.scrollTop;
 				}
 			}
 			parentNode = parentNode.parentNode;
@@ -432,9 +432,20 @@
 //		this.toolTipH = toolTipDim.height;
 	
 		var elementDim = Richfaces.Position.getOffsetDimensions(this.toolTip);
+
+		// RF-1485, fix for FF
+		var _display = this.toolTip.style.display;
+		var _visibility = this.toolTip.style.visibility;
+		this.toolTip.style.visibility = "hidden";
+		this.toolTip.style.display = "block";
+		this.toolTip.style.top = "0px";
+		this.toolTip.style.left = "0px";
 		
 		var offsets = Position.cumulativeOffset(this.toolTip);
 		
+		this.toolTip.style.visibility = _visibility;
+		this.toolTip.style.display = _display;
+		
 		offsets[0] -= this.toolTip.offsetLeft || 0;
 		offsets[1] -= this.toolTip.offsetTop || 0;
 	




More information about the richfaces-svn-commits mailing list