Bug 37628 - Removing editable root's content collapses it
Summary: Removing editable root's content collapses it
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-14 17:59 PDT by Justin Garcia
Modified: 2023-01-05 01:56 PST (History)
4 users (show)

See Also:


Attachments
testcase (478 bytes, text/html)
2010-04-14 17:59 PDT, Justin Garcia
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Garcia 2010-04-14 17:59:11 PDT
Created attachment 53391 [details]
testcase

We have code to prop open root editable elements even if they do not contain content.  See RenderBlock::hasLineIfEmpty().  But if you programmatically remove content from an editable root it can collapse.  See the attached testcase.
Comment 1 Ahmad Saleem 2022-12-30 16:20:34 PST
All browsers (Safari 16.2, Chrome Canary 111 and Firefox Nightly 110) remove any text typed into editable field and upon clicking "Run Test".

Do we need to look into anything else? I am adding @rniwa for his input as well from HTML Editing perspective. Thanks!
Comment 2 Ryosuke Niwa 2023-01-05 01:56:06 PST
This seems to be working now.