mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
CategoryWidget: Remove reorder event fix after upstream fix
Change-Id: I9088c931433b0824f72b4c77d0fd05cb062068f7 Depends-On: I67945db3652b0edb24b490089b8ea5a43f0b29d0
This commit is contained in:
parent
659b9c3576
commit
115bf4b3d2
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue