Safari/Chrome/Firefox: Caret Rendering inconsistent with empty placeholder across browsers
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 202
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked repro at https://w3c.github.io/editing/repros/498.html and inspect the contenteditable example using a pseudo-element placeholder and br tag. Compare caret placement in Chrome, Safari, and Firefox, including the centered text case. Done means the expected caret behavior and any required specification or repro updates are agreed and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100