Skip to content

Safari/Chrome: Caret Rendering inconsistent with empty placeholder across browsers #498

@michael

Description

@michael

Caret placement with pseudo element and br tag

In Chrome when we render a pseudo element as "placeholder" we expect the caret to render in front of the multiline pseudo element in an empty html element (contenteditable) (should also work with text-align: center)

<style>
[placeholder].empty::before {
  content: attr(placeholder);
}
</style>
<div class="empty" contenteditable="true" placeholder="Hello"><br></div>

Actual behaviour:
in Chrome: Caret is rendered in last line after the last character of the placeholder
in Safari: Caret is rendered in last line before the first character of the last of the placeholder

Repro: https://w3c.github.io/editing/repros/498.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions