Author: max
Date: 2007-07-20 20:07:48 -0700 (Fri, 20 Jul 2007)
New Revision: 5740
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20070720-maxcarlson-d by [EMAIL PROTECTED] on 2007-07-20 15:20:10 PDT
in /Users/maxcarlson/openlaszlo/legals-checkin
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: UPDATED: Fix error in div position detection for IE 7
New Features:
Bugs Fixed: LPP-4176 - DHTML window increments x-y position when clicked in IE7
Technical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: __getPos() was off by two for ie 7 but not IE 6. Added quirk and set
for IE > version 6.
Tests: See LPP-4176
Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2007-07-20 23:26:27 UTC (rev 5739)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
2007-07-21 03:07:48 UTC (rev 5740)
@@ -206,6 +206,7 @@
,inputtext_parents_cannot_contain_clip: false
,minimize_opacity_changes: false
,set_height_for_multiline_inputtext: false
+ ,ie_offset_position_by_2: false
}
LzSprite.prototype.capabilities = {
@@ -256,6 +257,11 @@
// multiline inputtext height must be set directly - height: 100%
does not work. See LPP-4119
this.quirks['set_height_for_multiline_inputtext'] = true;
+
+ if (Lz.__BrowserDetect.version > 6) {
+ // IE 7 offsets div positions by 2 px. See LPP-4176.
+ this.quirks['ie_offset_position_by_2'] = true;
+ }
} else if (Lz.__BrowserDetect.isSafari) {
// Fix bug in where if any parent of an image is hidden the size
is 0
// TODO: Tucker claims this is fixed in the latest version of
webkit
@@ -1178,11 +1184,14 @@
var pos = {};
var box;
- if (el.getBoundingClientRect) { // IE
+ if (Lz.__BrowserDetect.isIE) { // IE
box = el.getBoundingClientRect();
var scrollTop = document.documentElement.scrollTop ||
document.body.scrollTop;
var scrollLeft = document.documentElement.scrollLeft ||
document.body.scrollLeft;
-
+ if (this.quirks['ie_offset_position_by_2']) {
+ scrollLeft -= 2;
+ scrollTop -= 2;
+ }
return {x: box.left + scrollLeft, y: box.top + scrollTop};
} else if (document.getBoxObjectFor) { // gecko
box = document.getBoxObjectFor(el);
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins