Bug 13501

Summary: REGRESSION (r21093): Pasting into text field fails and makes the caret disappear
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: hyatt
Priority: P1 Keywords: InRadar, Regression
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: data:text/html,<input>
Attachments:
Description Flags
Test case
none
Avoid cutting off layers when removing an anonymous block darin: review+

Description mitz 2007-04-26 08:27:15 PDT
To reproduce the bug, open the URL, copy some text to the clipboard, focus the text field and press Command-V.

Instead of the text being pasted into the field, the caret disappears. Blurring and refocusing the field doesn't bring the caret back.

This is not reproducible with just any text field (e.g. the google.com text field).
Comment 1 mitz 2007-04-26 08:28:29 PDT
For example, the bug doesn't happen with <div><input></div>.
Comment 2 mitz 2007-04-26 08:47:33 PDT
Regressed in <http://trac.webkit.org/projects/webkit/changeset/21093>.
Comment 3 Darin Adler 2007-04-28 10:54:10 PDT
I ran into this too! It's been preventing me from working on some bugs!
Comment 4 Darin Adler 2007-04-28 10:55:47 PDT
<rdar://problem/5168938>
Comment 5 mitz 2007-04-28 13:37:21 PDT
Created attachment 14247 [details]
Test case

This shows the root cause of the bug (which is not in editing or in form controls). The inner (green) div's layer gets lost due to the "!fullRemove/Insert/Append" shortcuts introduced in r21093.
Comment 6 mitz 2007-04-28 14:12:32 PDT
Created attachment 14248 [details]
Avoid cutting off layers when removing an anonymous block
Comment 7 Darin Adler 2007-04-28 16:53:20 PDT
Comment on attachment 14248 [details]
Avoid cutting off layers when removing an anonymous block

r=me
Comment 8 Darin Adler 2007-04-28 18:56:55 PDT
Sending        LayoutTests/ChangeLog
Adding         LayoutTests/fast/dynamic/anonymous-block-layer-lost-expected.checksum
Adding  (bin)  LayoutTests/fast/dynamic/anonymous-block-layer-lost-expected.png
Adding         LayoutTests/fast/dynamic/anonymous-block-layer-lost-expected.txt
Adding         LayoutTests/fast/dynamic/anonymous-block-layer-lost.html
Sending        WebCore/ChangeLog
Sending        WebCore/rendering/RenderBlock.cpp
Transmitting file data .......
Committed revision 21173.