execCommand('inserttext',...) behavior
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 202
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
I have a question about space canonicalization that happens in the browser when an user inserts or removes text or when it is done through execCommand(‘inserttext’,...). Spec: https://w3c.github.io/editing/execCommand.html#canonical-space-sequences – section 9.7.
I’ve been investigating what happens in Chrome when we have a situation with multiple spaces in the string: ‘ foo bar ‘.
It seems that there is a bug in Chrome. I was not able to investigate what happens in Firefox as I couldn’t see insertion of   in Firefox console. Not sure if Firefox is inserting it but it is not displayed in the console or like Edge, they are not doing it.
Chrome folks: this looks like a bug
Here is the sample: https://jsfiddle.net/mwvywtze/ .
Expected output:
some text foo bar
Actual output:
some text foo bar
thanks,
--grisha
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 section 9.7 of the linked execCommand specification and reproduce the behavior using the provided JSFiddle. Compare Chrome's output with the expected canonical space sequence and investigate the corresponding behavior in Firefox or Edge. Done means determining whether the result violates the specification and documenting the confirmed browser behavior or required specification clarification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100