aboutsummaryrefslogtreecommitdiffstats
path: root/resources/lib/oojs-ui/oojs-ui-widgets.js
diff options
context:
space:
mode:
authorVolker E <volker.e@wikimedia.org>2018-02-06 17:17:20 -0800
committerVolker E <volker.e@wikimedia.org>2018-02-06 17:17:21 -0800
commitac5eeba3444fe1a43170d39876406d509b766555 (patch)
tree4249611694ee99c66103fc7dd1a504c51c23ce5e /resources/lib/oojs-ui/oojs-ui-widgets.js
parentffae584e2eaacf46e702226c7a6b9fdab7e60f14 (diff)
downloadmediawikicore-ac5eeba3444fe1a43170d39876406d509b766555.tar.gz
mediawikicore-ac5eeba3444fe1a43170d39876406d509b766555.zip
Update OOUI to v0.25.2
Release notes: https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.25.2 Depends-on: Ib00f16ef5e74732068822dc10d43314098b8fa59 Change-Id: Ie327a10622b64b7f969283497822c494c513585b
Diffstat (limited to 'resources/lib/oojs-ui/oojs-ui-widgets.js')
-rw-r--r--resources/lib/oojs-ui/oojs-ui-widgets.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/resources/lib/oojs-ui/oojs-ui-widgets.js b/resources/lib/oojs-ui/oojs-ui-widgets.js
index 4bb5a444d0b4..a7c90a0ce71e 100644
--- a/resources/lib/oojs-ui/oojs-ui-widgets.js
+++ b/resources/lib/oojs-ui/oojs-ui-widgets.js
@@ -1,12 +1,12 @@
/*!
- * OOUI v0.25.1
+ * OOUI v0.25.2
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2018 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2018-01-17T01:47:15Z
+ * Date: 2018-02-07T00:27:24Z
*/
( function ( OO ) {
@@ -154,7 +154,7 @@ OO.ui.mixin.DraggableElement.prototype.onDragStart = function ( e ) {
// We must set up a dataTransfer data property or Firefox seems to
// ignore the fact the element is draggable.
try {
- dataTransfer.setData( 'application-x/OOjs-UI-draggable', this.getIndex() );
+ dataTransfer.setData( 'application-x/OOUI-draggable', this.getIndex() );
} catch ( err ) {
// The above is only for Firefox. Move on if it fails.
}
@@ -5704,6 +5704,7 @@ OO.ui.PopupTagMultiselectWidget.prototype.addTagByPopupValue = function ( data,
*
* @constructor
* @param {Object} [config] Configuration object
+ * @cfg {boolean} [clearInputOnChoose=true] Clear the text input value when a menu option is chosen
* @cfg {Object} [menu] Configuration object for the menu widget
* @cfg {jQuery} [$overlay] An overlay for the menu.
* See <https://www.mediawiki.org/wiki/OOUI/Concepts#Overlays>.
@@ -5716,7 +5717,7 @@ OO.ui.MenuTagMultiselectWidget = function OoUiMenuTagMultiselectWidget( config )
OO.ui.MenuTagMultiselectWidget.parent.call( this, config );
this.$overlay = ( config.$overlay === true ? OO.ui.getDefaultOverlay() : config.$overlay ) || this.$element;
-
+ this.clearInputOnChoose = config.clearInputOnChoose === undefined || !!config.clearInputOnChoose;
this.menu = this.createMenuWidget( $.extend( {
widget: this,
input: this.hasInput ? this.input : null,
@@ -5792,6 +5793,9 @@ OO.ui.MenuTagMultiselectWidget.prototype.onInputChange = function () {
OO.ui.MenuTagMultiselectWidget.prototype.onMenuChoose = function ( menuItem ) {
// Add tag
this.addTag( menuItem.getData(), menuItem.getLabel() );
+ if ( this.hasInput && this.clearInputOnChoose ) {
+ this.input.setValue( '' );
+ }
};
/**