w3c / w3c/editing

Safari Desktop: Conditional Show/ Hide of br element in contenteditable element make caret disappear

Open
#499 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug-reports-filed caret-movement
Dominant language
HTML
Stars
202
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Because of certain caret rendering issues (see #498) I found a solution in hiding the br element when the element is empty and focused.

This works fine in Chrome, but not in Safari.

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction at https://w3c.github.io/editing/repros/499.html and compare the conditional br visibility behavior in Safari and Chrome. Read issue #498 for the caret-rendering context. Done means the empty, focused contenteditable element keeps its caret visible in Safari without regressing the Chrome behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.