jenkins-bot has submitted this change and it was merged.

Change subject: CategoryPopupWidget: Track popup hiding again so sortkey 
changes are applied
......................................................................


CategoryPopupWidget: Track popup hiding again so sortkey changes are applied

OOjs UI killed the 'hide' event that was running this code in the dialog 
refactor
back in July (Id121fc3a), but left it documented (along with 'show').

Just use the 'toggle' event instead.

Bug: 72168
Change-Id: I172fac81c4cbb89505522011aed57db57ccbc52f
---
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
1 file changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
index 1334c4a..48c13b2 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
@@ -43,7 +43,7 @@
                .append( this.sortKeyField.$element );
 
        // Events
-       this.connect( this, { hide: 'onHide' } );
+       this.connect( this, { toggle: 'onToggle' } );
        this.removeButton.connect( this, { click: 'onRemoveCategory' } );
        this.$sortKeyForm.on( 'submit', this.onSortKeySubmit.bind( this ) );
 
@@ -122,11 +122,15 @@
 };
 
 /**
- * Handle popup hide events.
+ * Handle popup toggle events.
  *
+ * @param {boolean} show Widget is being made visible
  * @method
  */
-ve.ui.MWCategoryPopupWidget.prototype.onHide = function () {
+ve.ui.MWCategoryPopupWidget.prototype.onToggle = function ( show ) {
+       if ( show ) {
+               return;
+       }
        var newSortkey = this.sortKeyInput.$input.val();
        if ( !this.removed && newSortkey !== ( this.origSortkey || '' ) ) {
                this.emit( 'updateSortkey', this.category, 
this.sortKeyInput.$input.val() );

-- 
To view, visit https://gerrit.wikimedia.org/r/167876
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I172fac81c4cbb89505522011aed57db57ccbc52f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to