Add slugs inside empty branch nodes so cursor can be correctly placed.

Change-Id: I075a76da50bd4927c3832a660fdf96bbd250e3b0
This commit is contained in:
Inez Korczynski 2012-06-20 16:43:35 -07:00
parent e4ada5296a
commit a62e78292f

View file

@ -168,6 +168,12 @@ ve.ce.BranchNode.prototype.onSplice = function( index, howmany ) {
}
// Iterate over all children of this branch and add slugs in appropriate places
if ( this.getLength() === 0 ) {
this.$.empty();
this.$slugs = this.$slugs.add(
$slug.clone().appendTo( this.$ )
);
}
for ( i = 0; i < this.children.length; i++ ) {
if ( this.children[i].canHaveSlug() ) {
if ( i === 0 ) {