diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js index ef3f2e3725..8393c0a1f4 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js @@ -74,7 +74,7 @@ ve.ui.MWTemplateDialog.prototype.getReadyProcess = function ( data ) { this.bookletLayout.focus(); } - this.bookletLayout.stackLayout.getItems().forEach( function ( page ) { + this.bookletLayout.getPagesOrdered().forEach( function ( page ) { if ( page instanceof ve.ui.MWParameterPage ) { page.updateSize(); } diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js index c452b0e0e3..febec33002 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js @@ -586,7 +586,7 @@ ve.ui.MWTransclusionDialog.prototype.onWindowResize = function () { if ( this.transclusionModel ) { this.autoExpandSidebar(); - this.bookletLayout.stackLayout.getItems().forEach( function ( page ) { + this.bookletLayout.getPagesOrdered().forEach( function ( page ) { if ( page instanceof ve.ui.MWParameterPage ) { page.updateSize(); } diff --git a/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js b/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js index aa9d0fa8cf..4018fcffab 100644 --- a/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js +++ b/modules/ve-mw/ui/layouts/ve.ui.MWTwoPaneTransclusionDialogLayout.js @@ -208,6 +208,15 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getOutlineControls = function return this.outlineControlsWidget; }; +/** + * Get the list of pages on the stack ordered by appearance. + * + * @return {OO.ui.PageLayout[]} + */ +ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getPagesOrdered = function () { + return this.stackLayout.getItems(); +}; + /** * Get a page by its symbolic name. *