diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWReferencesListDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWReferencesListDialog.js index 0627e365db..d98c59a5f9 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWReferencesListDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWReferencesListDialog.js @@ -83,6 +83,7 @@ ve.ui.MWReferencesListDialog.prototype.initialize = function () { this.groupInput = new ve.ui.MWReferenceGroupInputWidget( { $: this.$, + $overlay: this.$overlay, emptyGroupName: ve.msg( 'visualeditor-dialog-reference-options-group-placeholder' ) } ); this.groupField = new OO.ui.FieldLayout( this.groupInput, { diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js index 4797914184..a7e52f3e66 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js @@ -254,7 +254,11 @@ ve.ui.MWTemplateDialog.prototype.getPageFromPart = function ( part ) { if ( part instanceof ve.dm.MWTemplateModel ) { return new ve.ui.MWTemplatePage( part, part.getId(), { $: this.$ } ); } else if ( part instanceof ve.dm.MWTemplatePlaceholderModel ) { - return new ve.ui.MWTemplatePlaceholderPage( part, part.getId(), { $: this.$ } ); + return new ve.ui.MWTemplatePlaceholderPage( + part, + part.getId(), + { $: this.$, $overlay: this.$overlay } + ); } return null; }; diff --git a/modules/ve-mw/ui/pages/ve.ui.MWTemplatePlaceholderPage.js b/modules/ve-mw/ui/pages/ve.ui.MWTemplatePlaceholderPage.js index 997bbf2378..d888ef33e8 100644 --- a/modules/ve-mw/ui/pages/ve.ui.MWTemplatePlaceholderPage.js +++ b/modules/ve-mw/ui/pages/ve.ui.MWTemplatePlaceholderPage.js @@ -15,6 +15,7 @@ * @param {ve.dm.MWTemplatePlaceholderModel} placeholder Template placeholder * @param {string} name Unique symbolic name of page * @param {Object} [config] Configuration options + * @cfg {jQuery} [$overlay] Overlay for dropdowns */ ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeholder, name, config ) { // Configuration initialization @@ -29,7 +30,7 @@ ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeh this.placeholder = placeholder; this.addTemplateInput = new ve.ui.MWTitleInputWidget( { - $: this.$, $overlay: this.$overlay, namespace: 10 + $: this.$, $overlay: config.$overlay, namespace: 10 } ) .connect( this, { change: 'onTemplateInputChange',