Merge "Add wfDeprecated() call to MimeMagic::singleton()"
[lhc/web/wiklou.git] / resources / lib / oojs-ui / oojs-ui-toolbars.js
index b52dae6..7361928 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.23.3
+ * OOjs UI v0.24.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-10-04T01:20:41Z
+ * Date: 2017-11-28T23:28:05Z
  */
 ( function ( OO ) {
 
@@ -1857,6 +1857,33 @@ OO.mixinClass( OO.ui.PopupToolGroup, OO.ui.mixin.TabIndexedElement );
 
 /* Methods */
 
+/**
+ * @inheritdoc OO.ui.mixin.ClippableElement
+ */
+OO.ui.PopupToolGroup.prototype.getHorizontalAnchorEdge = function () {
+       var out;
+       if ( this.$element.hasClass( 'oo-ui-popupToolGroup-right' ) ) {
+               out = 'right';
+       } else {
+               out = 'left';
+       }
+       // Flip for RTL
+       if ( this.$element.css( 'direction' ) === 'rtl' ) {
+               out = ( out === 'left' ) ? 'right' : 'left';
+       }
+       return out;
+};
+
+/**
+ * @inheritdoc OO.ui.mixin.ClippableElement
+ */
+OO.ui.PopupToolGroup.prototype.getVerticalAnchorEdge = function () {
+       if ( this.toolbar.position === 'bottom' ) {
+               return 'bottom';
+       }
+       return 'top';
+};
+
 /**
  * @inheritdoc
  */
@@ -1962,7 +1989,9 @@ OO.ui.PopupToolGroup.prototype.setActive = function ( value ) {
                        if ( this.isClippedHorizontally() ) {
                                // Anchoring to the right also caused the popup to clip, so just make it fill the container
                                containerWidth = this.$clippableScrollableContainer.width();
-                               containerLeft = this.$clippableScrollableContainer.offset().left;
+                               containerLeft = this.$clippableScrollableContainer[ 0 ] === document.documentElement ?
+                                       0 :
+                                       this.$clippableScrollableContainer.offset().left;
 
                                this.toggleClipping( false );
                                this.$element.removeClass( 'oo-ui-popupToolGroup-right' );