Use page ID string instead of object reference

You will see where I'm going with this in the following patches.

Bug: T288827
Change-Id: Ifd52369d19c01499fb9cc801c3deec46c26810fd
This commit is contained in:
Thiemo Kreuz 2021-08-19 15:39:20 +02:00
parent c24b91ce5c
commit 47bed4e1c8

View file

@ -113,7 +113,7 @@ ve.ui.MWTemplateDialog.prototype.onReplacePart = function ( removed, added ) {
removed.disconnect( this );
}
if ( this.loaded && !this.preventReselection && partPage.isActive() ) {
reselect = this.bookletLayout.findClosestPage( partPage );
reselect = this.bookletLayout.findClosestPage( partPage ).getName();
}
removePages.push( partPage );
this.bookletLayout.removePages( removePages );
@ -153,7 +153,7 @@ ve.ui.MWTemplateDialog.prototype.onReplacePart = function ( removed, added ) {
}
}
} else if ( reselect ) {
this.transclusions.focusPart( reselect.getName() );
this.transclusions.focusPart( reselect );
}
if ( this.loaded && ( added || removed ) ) {