Bug 112854 - contenteditable element does not completely surrender focus
Summary: contenteditable element does not completely surrender focus
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Unspecified
: P2 Normal
Assignee: Nobody
URL: http://jsfiddle.net/A9QXk/
Keywords: HasReduction
Depends on: 38696
  Show dependency treegraph
Reported: 2013-03-20 16:22 PDT by Jared Jacobs
Modified: 2014-04-23 22:08 PDT (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jared Jacobs 2013-03-20 16:22:35 PDT
To reproduce the problem:
1. Type in a contenteditable element.
2. Click outside the contenteditable element on a focusable control that does not support text entry (e.g. a button).
3. Type an "x".

The blinking caret is still in the editable element after step 2, even though focus had left it. The blinking caret should have been gone.

After step 3, an "x" was added to the editable box and it had reclaimed focus. Neither of those things should have happened.

I have witnessed the bug on the webkit nightly at SVN r146339. The bug has affected Safari and Chrome for years.

Here is a workaround, dated July 2011:
It's the top web search result for "webkit contenteditable workaround".