w3c / editing

Specs and explainers maintained by the editing task force
http://w3c.github.io/editing/
Other
192 stars 40 forks source link

Outdent immediately after indent should restore pre-indent DOM (like popular editors do) #443

Open joanmarie opened 1 year ago

joanmarie commented 1 year ago

(Spun off from issue https://github.com/w3c/editing/issues/437).

In popular editors, if you indent something and then immediately outdent it, the result is as if you made no changes. IMHO, that is the expected result, both for the popular editors and for native contenteditable elements.

If you try anything but the simplest of cases, especially in Chromium and WebKit, the result is ... Well, try it out yourself. 😀 You can make it more visually obvious by using multiple levels of divs with colored borders and some brs sprinkled throughout.