mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Use OOUI's native "unselect all" feature
No need to manually scan for the currently selected item. And no need to do it twice. The feature is a little hidden (calling the method with no parameter) but always was supported. Bug: T356871 Change-Id: I02401284eef5687eb0825d8d9ae0df294b3b4e03
This commit is contained in:
parent
90dc52620c
commit
96da6cedfe
|
@ -60,9 +60,7 @@ ve.ui.MWReferenceSearchWidget.prototype.onQueryChange = function () {
|
|||
* @param {ve.dm.InternalList} internalList Internal list
|
||||
*/
|
||||
ve.ui.MWReferenceSearchWidget.prototype.setInternalList = function ( internalList ) {
|
||||
if ( this.results.findSelectedItem() ) {
|
||||
this.results.findSelectedItem().setSelected( false );
|
||||
}
|
||||
this.results.unselectItem();
|
||||
|
||||
this.internalList = internalList;
|
||||
this.internalList.connect( this, { update: 'onInternalListUpdate' } );
|
||||
|
|
Loading…
Reference in a new issue