mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
ce1f4dac55
After indenting or outdenting a list item in a numbered list, the numbering wasn't updated. So if you had: 1. One 2. Two 3. Three and you indented "Two", you'd get: 1. One 1. Two 3. Three Adding or removing items in the list using the keyboard, or even inspecting the list in Firebug (!), would trigger a renumbering and fix the list to display "2. Three". But then the same issue would occur in in reverse when outdenting "Two" (either using undo or using the outdent button): 1. One 2. Two 2. Three The workaround is to force a reflow by requesting the height (thank you Timo). Implemented this in an override of onSplice() in ve.ce.ListNode, so the list is detached and reattached every time children are spliced into or out of it. I haven't managed to come up with a minimal test case for this, not even by putting a list in a contentEditable div and doing the same DOM operations that ve.ce does from a setTimeout callback. Change-Id: I93b2a309034c411a7b4e4b6c6bd4ef9d473999eb |
||
---|---|---|
.. | ||
nodes | ||
styles | ||
ve.ce.BranchNode.js | ||
ve.ce.Document.js | ||
ve.ce.js | ||
ve.ce.LeafNode.js | ||
ve.ce.Node.js | ||
ve.ce.NodeFactory.js | ||
ve.ce.Surface.js |