mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-17 18:30:49 +00:00
OOUI .addItems() must be called with an array
Some versions of OOUI also accepted single non-array items. But this was never official. Let's follow the spec. Change-Id: Ie14431be802a6c71127c1b418e750ce5c9beb863
This commit is contained in:
parent
d117393e75
commit
9c1031c3fa
|
@ -73,21 +73,18 @@
|
|||
);
|
||||
|
||||
// remove real item from item list, without touching the DOM
|
||||
this.removeItems( item );
|
||||
this.removeItems( [ item ] );
|
||||
|
||||
// insert real item, hidden
|
||||
item.$element.hide();
|
||||
this.addItems( item );
|
||||
|
||||
// insert fake
|
||||
this.addItems( fakeWidget );
|
||||
this.addItems( [ item, fakeWidget ] );
|
||||
|
||||
// fade out fake
|
||||
// FIXME: Use CSS transition
|
||||
// eslint-disable-next-line no-jquery/no-fade
|
||||
fakeWidget.$element.fadeOut( 400, function () {
|
||||
// remove fake
|
||||
widget.removeItems( fakeWidget );
|
||||
widget.removeItems( [ fakeWidget ] );
|
||||
// fade-in real item
|
||||
// eslint-disable-next-line no-jquery/no-fade
|
||||
item.$element.fadeIn( 400 );
|
||||
|
|
Loading…
Reference in a new issue