Bug 42645 - focusing the body of a contentEditable iframe resets the selection
Summary: focusing the body of a contentEditable iframe resets the selection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Ojan Vafai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-20 09:55 PDT by Ojan Vafai
Modified: 2010-08-02 13:50 PDT (History)
8 users (show)

See Also:


Attachments
test case (554 bytes, text/html)
2010-07-20 09:55 PDT, Ojan Vafai
no flags Details
Patch (4.22 KB, patch)
2010-07-20 13:50 PDT, Ojan Vafai
no flags Details | Formatted Diff | Diff
Update to ToT (4.13 KB, patch)
2010-07-20 15:57 PDT, Ojan Vafai
no flags Details | Formatted Diff | Diff
Patch (4.08 KB, patch)
2010-08-02 13:32 PDT, Ojan Vafai
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2010-07-20 09:55:02 PDT
See the attached test case.
Comment 1 Ojan Vafai 2010-07-20 09:55:21 PDT
Created attachment 62086 [details]
test case
Comment 2 Ojan Vafai 2010-07-20 10:41:04 PDT
In fact, there's a FIXME in Element::updateFocusAppearance that we should restore the previous selection if there is one.
Comment 3 Ojan Vafai 2010-07-20 13:50:04 PDT
Created attachment 62107 [details]
Patch
Comment 4 Ojan Vafai 2010-07-20 15:57:15 PDT
Created attachment 62126 [details]
Update to ToT
Comment 5 Eric Seidel (no email) 2010-08-02 11:28:56 PDT
Comment on attachment 62126 [details]
Update to ToT

WebCore/dom/Element.cpp: 
 +          if (!frame)
Split this out into a separate if, and add a comment as to why we're making this check (what it's supposed to do).
Comment 6 Ojan Vafai 2010-08-02 13:32:30 PDT
Created attachment 63251 [details]
Patch
Comment 7 Ojan Vafai 2010-08-02 13:50:48 PDT
Committed r64489: <http://trac.webkit.org/changeset/64489>