Update OOjs UI to v0.22.3
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-widgets.js
index 6460ae4..e69cae2 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.22.2
+ * OOjs UI v0.22.3
  * 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-06-28T19:51:59Z
+ * Date: 2017-07-11T22:12:33Z
  */
 ( function ( OO ) {
 
@@ -5545,6 +5545,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 );