Closed Bug 1132768 Opened 5 years ago Closed 5 years ago

Cursor can be placed in contenteditable=false element inside of contenteditable=true container if cursor was previously in a different contenteditable container

Categories

(Core :: DOM: Editor, defect)

35 Branch
x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed
firefox40 --- wontfix
firefox41 --- wontfix
firefox42 --- fixed

People

(Reporter: roan.kattouw, Assigned: ehsan)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
Build ID: 20150125222008

Steps to reproduce:

See http://jsfiddle.net/8ea7aff2/

1. Click in "I am div number one" to place cursor
2. Click in the "I am not editable" in the first div; entire div is selected
3. Click in "I am div number two"
4. Click in the "I am not editable" in the first div again; cursor appears this time


Actual results:

In step 4, the cursor appeared in a ce=false area.


Expected results:

It should not be possible for the cursor to appear in a ce=false area.

Firefox prevents this correctly when the cursor is moving within ce=true container that contains the ce=false node like in #2 (it selecting the text isn't correct, but that's bug 1097242), but when the cursor moves from a different ce=true container, this is not prevented.

In Chrome, the cursor does not enter the ce=false area when you click in it, regardless of whether the selection came from the same ce=true container or a different one.
Flags: needinfo?(ehsan)
Summary: Cursor can be placed in contenteditable=false element inside of contenteditable=true container f cursor was previously in a different contenteditable container → Cursor can be placed in contenteditable=false element inside of contenteditable=true container if cursor was previously in a different contenteditable container
See Also: → 1097242
Component: Untriaged → Editor
Flags: needinfo?(ehsan)
Product: Firefox → Core
Trying a fix: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4d2ef5bb81f6
Assignee: nobody → ehsan
Second try: https://hg.mozilla.org/integration/mozilla-inbound/rev/99419a04c349

Had to disable selection carets in addition to touch carets.
https://hg.mozilla.org/mozilla-central/rev/99419a04c349
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Depends on: 1137717
Depends on: 1181130
This was backed out from Fx40/Fx41 for causing bug 1181130.
You need to log in before you can comment on or make changes to this bug.