Merge "Group messages in WANObjectCache by key"
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-core.js
index 082b7ec..20c58ff 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.24.0
+ * OOjs UI v0.24.2
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2017 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2017-10-17T23:18:51Z
+ * Date: 2017-11-07T22:52:40Z
  */
 ( function ( OO ) {
 
@@ -7555,7 +7555,7 @@ OO.ui.DropdownWidget.prototype.onMenuSelect = function ( item ) {
  * Handle menu toggle events.
  *
  * @private
- * @param {boolean} isVisible Menu toggle event
+ * @param {boolean} isVisible Open state of the menu
  */
 OO.ui.DropdownWidget.prototype.onMenuToggle = function ( isVisible ) {
        this.$element.toggleClass( 'oo-ui-dropdownWidget-open', isVisible );
@@ -7589,10 +7589,15 @@ OO.ui.DropdownWidget.prototype.onKeyDown = function ( e ) {
                !this.isDisabled() &&
                (
                        e.which === OO.ui.Keys.ENTER ||
+                       (
+                               e.which === OO.ui.Keys.SPACE &&
+                               // Avoid conflicts with type-to-search, see SelectWidget#onKeyPress.
+                               // Space only closes the menu is the user is not typing to search.
+                               this.menu.keyPressBuffer === ''
+                       ) ||
                        (
                                !this.menu.isVisible() &&
                                (
-                                       e.which === OO.ui.Keys.SPACE ||
                                        e.which === OO.ui.Keys.UP ||
                                        e.which === OO.ui.Keys.DOWN
                                )
@@ -10679,7 +10684,8 @@ OO.ui.ComboBoxInputWidget = function OoUiComboBoxInputWidget( config ) {
        this.menu.connect( this, {
                choose: 'onMenuChoose',
                add: 'onMenuItemsChange',
-               remove: 'onMenuItemsChange'
+               remove: 'onMenuItemsChange',
+               toggle: 'onMenuToggle'
        } );
 
        // Initialization
@@ -10790,6 +10796,16 @@ OO.ui.ComboBoxInputWidget.prototype.onMenuItemsChange = function () {
        this.$element.toggleClass( 'oo-ui-comboBoxInputWidget-empty', this.menu.isEmpty() );
 };
 
+/**
+ * Handle menu toggle events.
+ *
+ * @private
+ * @param {boolean} isVisible Open state of the menu
+ */
+OO.ui.ComboBoxInputWidget.prototype.onMenuToggle = function ( isVisible ) {
+       this.$element.toggleClass( 'oo-ui-comboBoxInputWidget-open', isVisible );
+};
+
 /**
  * @inheritdoc
  */