Open Bug 1104269 Opened 11 years ago Updated 5 years ago

execCommand highlight broken in some cases with absolutely positioned elements

Categories

(Core :: DOM: Editor, defect, P5)

36 Branch
defect

Tracking

()

People

(Reporter: lakenen, Unassigned)

Details

(Keywords: reproducible, testcase)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36 Steps to reproduce: 1. Go to this URL: http://jsbin.com/hidoqeyegi/2 2. Select the text as described. 3. Click the button. Actual results: "This should be highlighted." is not highlighted. Expected results: "This should be highlighted." should be highlighted. This works as expected in stable versions of Chrome, Safari, and IE. It seems to be because the <span> tag that applies the background color ends up surrounding the absolutely-positioned <span> that contains the actual text, so thus the outer span has no width. Chrome (probably the others as well) seems to be smart enough to wrap the innermost node (in this case just the text) that is not positioned, so the background-color <span> ends up inside the absolutely-positioned <span>.
Status: UNCONFIRMED → NEW
Component: Untriaged → Editor
Ever confirmed: true
OS: Mac OS X → All
Product: Firefox → Core
Hardware: x86 → All

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.