Two-pane layout setPage has all the desired side-effects

This becomes the canonical method to call when we want to update the
template dialog to select a new item.

Bug: T311987
Change-Id: Ie7880bfde41b77f0e6367cc8e3a78edb299391ce
This commit is contained in:
Adam Wight 2022-07-04 13:30:04 +02:00
parent 0c4716aaaf
commit 8448f513a4

View file

@ -358,7 +358,7 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.clearPages = function () {
};
/**
* Set the current page by symbolic name. Doesn't focus the input.
* Set the current page and sidebar selection, by symbolic name. Doesn't focus the input.
*
* @param {string} name Symbolic name of page
*/
@ -385,8 +385,9 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.setPage = function ( name ) {
}
}
}
page.scrollElementIntoView();
page.setActive( true );
this.onStackLayoutSet( page );
this.sidebar.setSelectionByPageName( name );
this.refreshControls();
};