Skip to content

[css-ui?] Define interaction of block layout and editing. #4904

@emilio

Description

@emilio

It seems all browsers except Gecko hack block layout so that an editable block has at least one non-empty line, see this test-case.

That is, other browsers render <div contenteditable></div> the same as <div><br></div>.

I'm on the fence on whether this is a browser bug on other browsers, or something that we should match and should be specified. If the later, how we do define this?

It seems other browsers only apply it to the editable root?

In blink this is done in LayoutBlock::HasLineIfEmpty, which seems inherited from WebKit's RenderBlock::hasLineIfEmpty.

I see the "do what I mean" intent of this, but it seems a bit of a layering violation / hack to me :(

cc @jfkthame @masayuki-nakano @kojiishi @rniwa

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions