Open Bug 645820 Opened 15 years ago Updated 3 years ago

Caret sticks around after contenteditable element is removed

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

People

(Reporter: sidney, Unassigned)

Details

(Keywords: testcase, Whiteboard: [post-2.0])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16 Build Identifier: 4.0 When a contenteditable element is removed from the document, its insertion point jumps to the top left corner of the first ancestor which is still present. Related, when a contenteditable element is made not contenteditable, it stays focused and its insertion point sticks around. Reproducible: Always Steps to Reproduce: 1. Create a contenteditable element 2. Remove it from the document while it has focus. (Or, for the other side of this bug, remove its contenteditable attribute while it has focus. Actual Results: The insertion point sticks around, and attaches itself to the first remaining ancestor in the document. In certain styling cases, the insertion point may be HUGE (i.e. the full height of the parent element). Expected Results: The element loses focus and the insertion point goes away.
Attached file Test case (obsolete) —
OS: Mac OS X → All
Hardware: x86 → All
Attached file Test case
Fix a typo in the test case.
Attachment #522456 - Attachment is obsolete: true
Confirmed against Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110328 Firefox/4.2a1pre ID:20110328030450
Keywords: testcase
Version: unspecified → Trunk
Summary: Insertion point sticks around after contenteditable element is removed → Caret sticks around after contenteditable element is removed
Confirmed Build identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110331 Firefox/4.2a1pre
Status: UNCONFIRMED → NEW
Ever confirmed: true
We currently only hide the caret when the editable element loses focus. This is arguably wrong, and I think we should make sure that when we're not in the caret browsing mode, we only show the caret when it's attached to an editable element. Sidney, is this bug happening for you on a website that you own or use?
Assignee: nobody → ehsan
Whiteboard: [post-2.0]
(In reply to comment #5) > We currently only hide the caret when the editable element loses focus. This > is arguably wrong, and I think we should make sure that when we're not in the > caret browsing mode, we only show the caret when it's attached to an editable > element. > > Sidney, is this bug happening for you on a website that you own or use? Gotcha. Yep, you can currently reproduce it at <http://distro.fm/#/find>: search for a network (e.g. eardrumnyc) and hit return. We’re going to put in a workaround eventually, but for the moment the insertion point sticks around, attached to the network’s landing page.
Assignee: ehsan → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: