This project is archived and is in readonly mode.

Element.getOffsets() is broken in iOS 4.3 if using -webkit-transform
Reported by Kevin Lee | April 5th, 2011 @ 07:27 AM | in 1.4.0 (closed)
Element.getOffsets() is not reporting the correct values if an element is within a div that has been translated using the -webkit-transform property in MobileSafari in iOS 4.3.1. This is the case as tested on my iPhone 3GS and iPad 1, both with iOS 4.3.1.
Please see the attached HTML file to see a test case. The red border box should have the getOffsets() values of the red box itself, it reads (20, 20) on webkit browsers on my Mac, as expected, but is instead (20+width_of_browser_window, 20) on iOS. The red box is within a DIV that had been translated to the left using -webkit-transform, the red box is itself translated to the right to compensate.
Seems to me the problem is in line 4313 of mootools_core_1.3.1.js, as for some reason this.getBoundingClientRect is ignored for iOS. Whatever issue that prevented this.getBoundingClientRect from being used in iOS I presume has been fixed in 4.3, as if I remove the ios check, the test case works as intended.
Comments and changes to this ticket
-
Kevin Lee April 5th, 2011 @ 07:28 AM
oh, and thanks for checking into this. Let me know if I'm not being clear.
-
Christoph Pojer April 14th, 2011 @ 11:28 AM
- State changed from new to open
- Milestone set to 1.4.0
- Milestone order changed from 907 to 0
-
Reece Karbowski January 8th, 2012 @ 10:02 PM
Additionally, elements within a div using CSS3 multi columns are also affected.
-
ibolmo January 19th, 2012 @ 10:28 AM
- State changed from open to invalid
Moved to Github Issues: https://github.com/mootools/mootools-core/issues/2245
Please use Github Issues, since Lighthouse has been deprecated.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »