w3c / w3c/editing

Should execCommand dispatch beforeinput or not?

Open
#200 67 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Agenda+ execCommand
Dominant language
HTML
Stars
202
Forks
43
PR merge metrics
No merged PRs in 30d

Description

I briefly tested execCommand and beforeinput in https://codepen.io/SaschaNaz/pen/WNepGPa. For execCommand("bold"), Chrome does not dispatch beforeinput while Safari does dispatch it with inputType: "" (whereas both dispatch input). As I see nothing about beforeinput on execCommand spec, which is the expected behavior here?

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 linked CodePen and compare the reported Chrome and Safari behavior for execCommand("bold"), beforeinput, and input. Review the relevant editing specifications and discussion to determine whether beforeinput should be dispatched and what inputType it should use; done means the expected behavior is clearly documented or resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
documentation, web-dev
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.