mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Add slugs inside empty branch nodes so cursor can be correctly placed.
Change-Id: I075a76da50bd4927c3832a660fdf96bbd250e3b0
This commit is contained in:
parent
e4ada5296a
commit
a62e78292f
|
@ -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
|
// 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++ ) {
|
for ( i = 0; i < this.children.length; i++ ) {
|
||||||
if ( this.children[i].canHaveSlug() ) {
|
if ( this.children[i].canHaveSlug() ) {
|
||||||
if ( i === 0 ) {
|
if ( i === 0 ) {
|
||||||
|
|
Loading…
Reference in a new issue