Outdent behavior with respect to list items is not aligned with popular editors
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 202
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
(Spun off from issue #437).
If you create an (un)ordered list in editors (I tried Google Docs and Microsoft 365 Word), indent nests the list item(s) and outdent reverses that, as expected. BUT at no point does outdent cause a list item to stop being a list item.
In contrast, if you load: data:text/html,<div contenteditable="true"><ul><li>foo</li><li>bar</li><li>baz</li></ul></div><button onclick="document.execCommand('outdent', false);">outdent</button>, click on "bar", and then click on the "outdent" button, you wind up with two unordered lists separated by "bar."
I personally think this is another instance where making the implementations match popular editors makes sense.
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 by reproducing the data:text/html example with contenteditable, the sample list, and document.execCommand('outdent'). Compare the result with the stated Google Docs and Microsoft 365 Word behavior; done means outdenting a list item changes its nesting without splitting it out of the list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100