0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -05:00

Maintain li numbering when splitting OL

This commit is contained in:
Neil Jenkins 2015-02-06 14:19:06 +07:00
parent 5b8e348232
commit 5865eb032a
3 changed files with 12 additions and 2 deletions

View file

@ -426,6 +426,11 @@ function split ( node, offset, stopNode ) {
offset = next;
}
// Maintain li numbering
if ( node.nodeName === 'OL' ) {
clone.start = ( +node.start || 1 ) + node.childNodes.length - 1;
}
// DO NOT NORMALISE. This may undo the fixCursor() call
// of a node lower down the tree!

File diff suppressed because one or more lines are too long

View file

@ -295,6 +295,11 @@ function split ( node, offset, stopNode ) {
offset = next;
}
// Maintain li numbering
if ( node.nodeName === 'OL' ) {
clone.start = ( +node.start || 1 ) + node.childNodes.length - 1;
}
// DO NOT NORMALISE. This may undo the fixCursor() call
// of a node lower down the tree!