CategoryWidget: Remove reorder event fix after upstream fix

Change-Id: I9088c931433b0824f72b4c77d0fd05cb062068f7
Depends-On: I67945db3652b0edb24b490089b8ea5a43f0b29d0
This commit is contained in:
Ed Sanders 2016-02-25 16:26:12 +00:00 committed by Jforrester
parent 659b9c3576
commit 115bf4b3d2

View file

@ -170,15 +170,7 @@ ve.ui.MWCategoryWidget.prototype.onDrag = function () {
ve.ui.MWCategoryWidget.prototype.reorder = function ( item, newIndex ) {
// Compute beforeCategory before removing, otherwise newIndex
// could be off by one
var beforeCategory,
originalIndex = this.items.indexOf( item );
if ( newIndex === originalIndex ) {
// TODO: This check should be upstream
return;
}
beforeCategory = this.items[ newIndex ] && this.items[ newIndex ].metaItem;
var beforeCategory = this.items[ newIndex ] && this.items[ newIndex ].metaItem;
if ( Object.prototype.hasOwnProperty.call( this.categories, item.value ) ) {
this.categories[ item.value ].metaItem.remove();
}