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:
parent
5b8e348232
commit
5865eb032a
3 changed files with 12 additions and 2 deletions
|
@ -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
|
@ -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!
|
||||
|
||||
|
|
Loading…
Reference in a new issue