Merge "Special:Newpages feed now shows first revision instead of latest revision"
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-widgets.js
index ee4d8c4..18695bf 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.22.1
+ * OOjs UI v0.22.4
  * 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-05-31T19:07:36Z
+ * Date: 2017-08-03T19:36:51Z
  */
 ( function ( OO ) {
 
@@ -277,7 +277,6 @@ OO.ui.mixin.DraggableGroupElement = function OoUiMixinDraggableGroupElement( con
        }
        this.$element
                .addClass( 'oo-ui-draggableGroupElement' )
-               .attr( 'role', 'listbox' )
                .append( this.$status )
                .toggleClass( 'oo-ui-draggableGroupElement-horizontal', this.orientation === 'horizontal' );
 };
@@ -1976,10 +1975,19 @@ OO.ui.BookletLayout.prototype.isOutlineVisible = function () {
  * @chainable
  */
 OO.ui.BookletLayout.prototype.toggleOutline = function ( show ) {
+       var booklet = this;
+
        if ( this.outlined ) {
                show = show === undefined ? !this.outlineVisible : !!show;
                this.outlineVisible = show;
                this.toggleMenu( show );
+               if ( show && this.editable ) {
+                       // HACK: When the sidebar stops animating, kill dumb scrollbars (T161798). Only necessary when
+                       // outline controls are present, The delay matches transition on `.oo-ui-menuLayout-menu`.
+                       setTimeout( function () {
+                               OO.ui.Element.static.reconsiderScrollbars( booklet.outlinePanel.$element[ 0 ] );
+                       }, 200 );
+               }
        }
 
        return this;
@@ -3196,7 +3204,7 @@ OO.ui.OutlineControlsWidget = function OoUiOutlineControlsWidget( outline, confi
        } );
        this.removeButton = new OO.ui.ButtonWidget( {
                framed: false,
-               icon: 'remove',
+               icon: 'trash',
                title: OO.ui.msg( 'ooui-outline-control-remove' )
        } );
        this.abilities = { move: true, remove: true };
@@ -3742,7 +3750,7 @@ OO.ui.CapsuleItemWidget = function OoUiCapsuleItemWidget( config ) {
        // Events
        this.closeButton = new OO.ui.ButtonWidget( {
                framed: false,
-               indicator: 'clear',
+               icon: 'close',
                tabIndex: -1
        } ).on( 'click', this.onCloseClick.bind( this ) );
 
@@ -4664,7 +4672,7 @@ OO.ui.TagItemWidget = function OoUiTagItemWidget( config ) {
 
        this.closeButton = new OO.ui.ButtonWidget( {
                framed: false,
-               indicator: 'clear',
+               icon: 'close',
                tabIndex: -1
        } );
        this.closeButton.setDisabled( this.isDisabled() );
@@ -5536,6 +5544,12 @@ OO.ui.TagMultiselectWidget.prototype.getPreviousItem = function ( item ) {
 OO.ui.TagMultiselectWidget.prototype.updateInputSize = function () {
        var $lastItem, direction, contentWidth, currentWidth, bestWidth;
        if ( this.inputPosition === 'inline' && !this.isDisabled() ) {
+               if ( this.input.$input[ 0 ].scrollWidth === 0 ) {
+                       // Input appears to be attached but not visible.
+                       // Don't attempt to adjust its size, because our measurements
+                       // are going to fail anyway.
+                       return;
+               }
                this.input.$input.css( 'width', '1em' );
                $lastItem = this.$group.children().last();
                direction = OO.ui.Element.static.getDir( this.$handle );