jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/347777 )
Change subject: FloatingMenuSelectWidget: Add 'ready' event after menu is clipped ...................................................................... FloatingMenuSelectWidget: Add 'ready' event after menu is clipped Fire a 'ready' event for when the menu is clipped and positioned. This is mostly so that users of this widget can manipulate positioning and styling inside the floating menu after the clipping and positioning was done. It also follows the same event in PopupWidget. Change-Id: Ic05fae63f271b8f9b579ad7471de50b02cab4406 --- M src/widgets/FloatingMenuSelectWidget.js 1 file changed, 12 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/src/widgets/FloatingMenuSelectWidget.js b/src/widgets/FloatingMenuSelectWidget.js index 0a3a19f..6ebf447 100644 --- a/src/widgets/FloatingMenuSelectWidget.js +++ b/src/widgets/FloatingMenuSelectWidget.js @@ -53,9 +53,18 @@ OO.inheritClass( OO.ui.FloatingMenuSelectWidget, OO.ui.MenuSelectWidget ); OO.mixinClass( OO.ui.FloatingMenuSelectWidget, OO.ui.mixin.FloatableElement ); +/* Events */ + +/** + * @event ready + * + * The menu is ready: it is visible and has been positioned and clipped. + */ + /* Methods */ /** + * @fires ready * @inheritdoc */ OO.ui.FloatingMenuSelectWidget.prototype.toggle = function ( visible ) { @@ -74,6 +83,9 @@ if ( change ) { this.togglePositioning( this.isVisible() ); + if ( visible ) { + this.emit( 'ready' ); + } } return this; -- To view, visit https://gerrit.wikimedia.org/r/347777 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic05fae63f271b8f9b579ad7471de50b02cab4406 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> Gerrit-Reviewer: Catrope <r...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits