Alex Monk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/167876
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, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/76/167876/1
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
index 1334c4a..9f86ea5 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,14 @@
};
/**
- * Handle popup hide events.
+ * Handle popup toggle events.
*
* @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: newchange
Gerrit-Change-Id: I172fac81c4cbb89505522011aed57db57ccbc52f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits