Update OOUI to v0.30.2
[lhc/web/wiklou.git] / resources / lib / ooui / oojs-ui-toolbars.js
index 22fbdbb..574b355 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOUI v0.29.3
+ * OOUI v0.30.2
  * https://www.mediawiki.org/wiki/OOUI
  *
- * Copyright 2011–2018 OOUI Team and other contributors.
+ * Copyright 2011–2019 OOUI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2018-11-01T02:03:33Z
+ * Date: 2019-01-23T01:14:20Z
  */
 ( function ( OO ) {
 
  *         toolbar.$element,
  *         contentFrame.$element.append( $area )
  *     );
- *     $( 'body' ).append( frame.$element );
+ *     $( document.body ).append( frame.$element );
  *
  *     // Here is where the toolbar is actually built. This must be done after inserting it into the
  *     // document.
  *         toolbar.$element,
  *         contentFrame.$element.append( $area )
  *     );
- *     $( 'body' ).append( frame.$element );
+ *     $( document.body ).append( frame.$element );
  *
  *     // Here is where the toolbar is actually built. This must be done after inserting it into the
  *     // document.
@@ -400,6 +400,7 @@ OO.ui.Toolbar.prototype.getToolGroupFactory = function () {
  *
  * @private
  * @param {jQuery.Event} e Mouse down event
+ * @return {undefined/boolean} False to prevent default if event is handled
  */
 OO.ui.Toolbar.prototype.onPointerDown = function ( e ) {
        var $closestWidgetToEvent = $( e.target ).closest( '.oo-ui-widget' ),
@@ -857,6 +858,7 @@ OO.ui.Tool.prototype.setActive = function ( state ) {
  *
  * @param {string|Function} title Title text or a function that returns text
  * @chainable
+ * @return {OO.ui.Tool} The tool, for chaining
  */
 OO.ui.Tool.prototype.setTitle = function ( title ) {
        this.title = OO.ui.resolveMsg( title );
@@ -1107,6 +1109,7 @@ OO.ui.ToolGroup.prototype.onDisable = function ( isDisabled ) {
  *
  * @protected
  * @param {jQuery.Event} e Mouse down or key down event
+ * @return {undefined/boolean} False to prevent default if event is handled
  */
 OO.ui.ToolGroup.prototype.onMouseKeyDown = function ( e ) {
        if (
@@ -1553,6 +1556,7 @@ OO.ui.PopupTool = function OoUiPopupTool( toolGroup, config ) {
        this.popup.connect( this, { toggle: 'onPopupToggle' } );
 
        // Initialization
+       this.popup.setAutoFlip( false );
        this.popup.setPosition( toolGroup.getToolbar().position === 'bottom' ? 'above' : 'below' );
        this.$element.addClass( 'oo-ui-popupTool' );
        this.popup.$element.addClass( 'oo-ui-popupTool-popup' );
@@ -1806,7 +1810,7 @@ OO.ui.ToolGroupTool.prototype.createGroup = function ( group ) {
  *         toolbar.$element,
  *         contentFrame.$element.append( $area )
  *     );
- *     $( 'body' ).append( frame.$element );
+ *     $( document.body ).append( frame.$element );
  *
  *     // Here is where the toolbar is actually built. This must be done after inserting it into the
  *     // document.
@@ -2049,6 +2053,7 @@ OO.ui.PopupToolGroup.prototype.onMouseKeyDown = function ( e ) {
  *
  * @protected
  * @param {jQuery.Event} e Mouse up or key up event
+ * @return {undefined/boolean} False to prevent default if event is handled
  */
 OO.ui.PopupToolGroup.prototype.onHandleMouseKeyUp = function ( e ) {
        if (
@@ -2064,6 +2069,7 @@ OO.ui.PopupToolGroup.prototype.onHandleMouseKeyUp = function ( e ) {
  *
  * @protected
  * @param {jQuery.Event} e Mouse down or key down event
+ * @return {undefined/boolean} False to prevent default if event is handled
  */
 OO.ui.PopupToolGroup.prototype.onHandleMouseKeyDown = function ( e ) {
        var $focusable;
@@ -2072,7 +2078,7 @@ OO.ui.PopupToolGroup.prototype.onHandleMouseKeyDown = function ( e ) {
                if ( e.which === OO.ui.Keys.TAB && !e.shiftKey ) {
                        $focusable = OO.ui.findFocusable( this.$group );
                        if ( $focusable.length ) {
-                               $focusable.focus();
+                               $focusable.trigger( 'focus' );
                                return false;
                        }
                }
@@ -2219,7 +2225,7 @@ OO.ui.PopupToolGroup.prototype.setActive = function ( value ) {
  *     frame.$element.append(
  *         toolbar.$element
  *     );
- *     $( 'body' ).append( frame.$element );
+ *     $( document.body ).append( frame.$element );
  *     // Build the toolbar. This must be done after the toolbar has been appended to the document.
  *     toolbar.initialize();
  *
@@ -2463,7 +2469,7 @@ OO.ui.ListToolGroup.prototype.updateCollapsibleState = function () {
  *         toolbar.$element,
  *         contentFrame.$element.append( $area )
  *     );
- *     $( 'body' ).append( frame.$element );
+ *     $( document.body ).append( frame.$element );
  *
  *     // Here is where the toolbar is actually built. This must be done after inserting it into the
  *     // document.