jenkins-bot has submitted this change and it was merged.

Change subject: Update OOjs UI to v0.2.3
......................................................................


Update OOjs UI to v0.2.3

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.2.3/History.md

Change-Id: Ia3d8a5a9df0efffd2b5cb1466e600cc0b77d7ef2
---
M lib/oojs-ui/oojs-ui-apex.css
M lib/oojs-ui/oojs-ui-apex.js
M lib/oojs-ui/oojs-ui-apex.rtl.css
M lib/oojs-ui/oojs-ui-apex.svg.css
M lib/oojs-ui/oojs-ui-apex.svg.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki.css
M lib/oojs-ui/oojs-ui-mediawiki.js
M lib/oojs-ui/oojs-ui-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki.svg.css
M lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
M lib/oojs-ui/oojs-ui.js
11 files changed, 105 insertions(+), 44 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/oojs-ui/oojs-ui-apex.css b/lib/oojs-ui/oojs-ui-apex.css
index f8916e8..1099933 100644
--- a/lib/oojs-ui/oojs-ui-apex.css
+++ b/lib/oojs-ui/oojs-ui-apex.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-left: -40%;
@@ -1011,7 +1011,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui-apex.js b/lib/oojs-ui/oojs-ui-apex.js
index 2a62964..ad75557 100644
--- a/lib/oojs-ui/oojs-ui-apex.js
+++ b/lib/oojs-ui/oojs-ui-apex.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:13Z
+ * Date: 2014-11-26T23:37:00Z
  */
 /* Instantiation */
 
diff --git a/lib/oojs-ui/oojs-ui-apex.rtl.css b/lib/oojs-ui/oojs-ui-apex.rtl.css
index f0dc53b..d1b324a 100644
--- a/lib/oojs-ui/oojs-ui-apex.rtl.css
+++ b/lib/oojs-ui/oojs-ui-apex.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-right: -40%;
@@ -1011,7 +1011,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui-apex.svg.css b/lib/oojs-ui/oojs-ui-apex.svg.css
index 26a4c0b..aa2dfb4 100644
--- a/lib/oojs-ui/oojs-ui-apex.svg.css
+++ b/lib/oojs-ui/oojs-ui-apex.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-left: -40%;
@@ -1011,7 +1011,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui-apex.svg.rtl.css 
b/lib/oojs-ui/oojs-ui-apex.svg.rtl.css
index 98dd242..339342c 100644
--- a/lib/oojs-ui/oojs-ui-apex.svg.rtl.css
+++ b/lib/oojs-ui/oojs-ui-apex.svg.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-right: -40%;
@@ -1011,7 +1011,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.css 
b/lib/oojs-ui/oojs-ui-mediawiki.css
index a70e18a..d8d3653 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-left: -40%;
@@ -918,7 +918,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.js b/lib/oojs-ui/oojs-ui-mediawiki.js
index 9a57c66..89338d6 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.js
+++ b/lib/oojs-ui/oojs-ui-mediawiki.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:13Z
+ * Date: 2014-11-26T23:37:00Z
  */
 /**
  * @class
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.rtl.css 
b/lib/oojs-ui/oojs-ui-mediawiki.rtl.css
index 9c31f6b..47ec917 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.rtl.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-right: -40%;
@@ -918,7 +918,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.svg.css 
b/lib/oojs-ui/oojs-ui-mediawiki.svg.css
index f38a637..d8aedd3 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.svg.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.svg.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-left: -40%;
@@ -918,7 +918,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css 
b/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
index 6d63768..6af2ca3 100644
--- a/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
+++ b/lib/oojs-ui/oojs-ui-mediawiki.svg.rtl.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:20Z
+ * Date: 2014-11-26T23:37:12Z
  */
 .oo-ui-progressBarWidget-slide-frames from {
        margin-right: -40%;
@@ -918,7 +918,7 @@
        background-color: transparent;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget,
-.oo-ui-radioOptionWidget .oo-ui-labelElement-label {
+.oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
        display: inline-block;
        vertical-align: middle;
 }
diff --git a/lib/oojs-ui/oojs-ui.js b/lib/oojs-ui/oojs-ui.js
index 2e2a011..d42139e 100644
--- a/lib/oojs-ui/oojs-ui.js
+++ b/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.2.2
+ * OOjs UI v0.2.3
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2014-11-25T01:13:13Z
+ * Date: 2014-11-26T23:37:00Z
  */
 ( function ( OO ) {
 
@@ -1756,11 +1756,20 @@
  * @return {number} Content height
  */
 OO.ui.Window.prototype.getContentHeight = function () {
-       // Temporarily resize the frame so getBodyHeight() can use scrollHeight 
measurements
-       var bodyHeight, oldHeight = this.$frame[0].style.height;
-       this.$frame[0].style.height = '1px';
+       // Temporarily resize the frame so getBodyHeight() can use scrollHeight 
measurements.
+       // Disable transitions first, otherwise we'll get values from when the 
window was animating.
+       var bodyHeight, oldHeight, oldTransition,
+               styleObj = this.$frame[0].style;
+       oldTransition = styleObj.transition || styleObj.OTransition || 
styleObj.MsTransition ||
+               styleObj.MozTransition || styleObj.WebkitTransition;
+       styleObj.transition = styleObj.OTransition = styleObj.MsTransition =
+               styleObj.MozTransition = styleObj.WebkitTransition = 'none';
+       oldHeight = styleObj.height;
+       styleObj.height = '1px';
        bodyHeight = this.getBodyHeight();
-       this.$frame[0].style.height = oldHeight;
+       styleObj.height = oldHeight;
+       styleObj.transition = styleObj.OTransition = styleObj.MsTransition =
+               styleObj.MozTransition = styleObj.WebkitTransition = 
oldTransition;
 
        return Math.round(
                // Add buffer for border
@@ -2275,6 +2284,7 @@
        this.actions = new OO.ui.ActionSet();
        this.attachedActions = [];
        this.currentAction = null;
+       this.onDocumentKeyDownHandler = this.onDocumentKeyDown.bind( this );
 
        // Events
        this.actions.connect( this, {
@@ -2438,6 +2448,10 @@
                                );
                        }
                        this.actions.add( items );
+
+                       if ( this.constructor.static.escapable ) {
+                               this.$document.on( 'keydown', 
this.onDocumentKeyDownHandler );
+                       }
                }, this );
 };
 
@@ -2448,6 +2462,10 @@
        // Parent method
        return OO.ui.Dialog.super.prototype.getTeardownProcess.call( this, data 
)
                .first( function () {
+                       if ( this.constructor.static.escapable ) {
+                               this.$document.off( 'keydown', 
this.onDocumentKeyDownHandler );
+                       }
+
                        this.actions.clear();
                        this.currentAction = null;
                }, this );
@@ -2462,11 +2480,6 @@
 
        // Properties
        this.title = new OO.ui.LabelWidget( { $: this.$ } );
-
-       // Events
-       if ( this.constructor.static.escapable ) {
-               this.$document.on( 'keydown', this.onDocumentKeyDown.bind( this 
) );
-       }
 
        // Initialization
        this.$content.addClass( 'oo-ui-dialog-content' );
@@ -3444,7 +3457,15 @@
 
 /* Methods */
 
-/** */
+/**
+ * Get tools from the factory
+ *
+ * @param {Array} include Included tools
+ * @param {Array} exclude Excluded tools
+ * @param {Array} promote Promoted tools
+ * @param {Array} demote Demoted tools
+ * @return {string[]} List of tools
+ */
 OO.ui.ToolFactory.prototype.getTools = function ( include, exclude, promote, 
demote ) {
        var i, len, included, promoted, demoted,
                auto = [],
@@ -5975,7 +5996,45 @@
  * @inheritdoc
  */
 OO.ui.MessageDialog.prototype.getBodyHeight = function () {
-       return Math.round( this.text.$element.outerHeight( true ) );
+       var bodyHeight, oldOverflow,
+               $scrollable = this.container.$element;
+
+       oldOverflow = $scrollable[0].style.overflow;
+       $scrollable[0].style.overflow = 'hidden';
+
+       // Force… ugh… something to happen
+       $scrollable.contents().hide();
+       $scrollable.height();
+       $scrollable.contents().show();
+
+       bodyHeight = Math.round( this.text.$element.outerHeight( true ) );
+       $scrollable[0].style.overflow = oldOverflow;
+
+       return bodyHeight;
+};
+
+/**
+ * @inheritdoc
+ */
+OO.ui.MessageDialog.prototype.setDimensions = function ( dim ) {
+       var $scrollable = this.container.$element;
+       OO.ui.MessageDialog.super.prototype.setDimensions.call( this, dim );
+
+       // Twiddle the overflow property, otherwise an unnecessary scrollbar 
will be produced.
+       // Need to do it after transition completes (250ms), add 50ms just in 
case.
+       setTimeout( function () {
+               var oldOverflow = $scrollable[0].style.overflow;
+               $scrollable[0].style.overflow = 'hidden';
+
+               // Force… ugh… something to happen
+               $scrollable.contents().hide();
+               $scrollable.height();
+               $scrollable.contents().show();
+
+               $scrollable[0].style.overflow = oldOverflow;
+       }, 300 );
+
+       return this;
 };
 
 /**
@@ -6420,9 +6479,12 @@
  */
 OO.ui.BookletLayout.prototype.focus = function () {
        var $input, page = this.stackLayout.getCurrentItem();
-       if ( !page ) {
+       if ( !page && this.outlined ) {
                this.selectFirstSelectablePage();
                page = this.stackLayout.getCurrentItem();
+               if ( !page ) {
+                       return;
+               }
        }
        // Only change the focus if is not already in the current page
        if ( !page.$element.find( ':focus' ).length ) {
@@ -9744,7 +9806,7 @@
  */
 OO.ui.TextInputWidget.prototype.onKeyPress = function ( e ) {
        if ( e.which === OO.ui.Keys.ENTER && !this.multiline ) {
-               this.emit( 'enter' );
+               this.emit( 'enter', e );
        }
 };
 
@@ -10390,7 +10452,6 @@
  *
  * @class
  * @extends OO.ui.OptionWidget
- * @mixins OO.ui.ButtonElement
  *
  * @constructor
  * @param {Object} [config] Configuration options

-- 
To view, visit https://gerrit.wikimedia.org/r/176175
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3d8a5a9df0efffd2b5cb1466e600cc0b77d7ef2
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to