Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.8.1, 1.9 M1
-
None
-
Internet Explorer
-
range detection position relative
-
Unit
-
Very hard
-
Description
In order to detect the current selection inside the rich text area in Internet Explorer we use the offsetLeft and offsetTop element properties. It seems that when an element has position:relative the offsetLeft and offsetTop properties of its descendants have wrong values, or at least not following the definition from MSDN. Take for instance the following HTML snippet:
<h1> <span>Title 1</span> </h1> <h2> <span>Title 2<br/>foo</span> </h2>
If the second heading has position:static then its inner BR has (in standards mode)
offsetLeft: 0 offsetTop: 55 offsetParent: HTML element
After we set position:relative for the second heading the BR has:
offsetLeft: 0 offsetTop: 55 offsetParent: H2 element
The offsetTop property should have decreased because the new offsetParent is clearly not the first element on the page.
Attachments
Issue Links
- relates to
-
XWIKI-3598 Hitting return twice at the end of a heading doesn't go out of the heading in IE
- Closed