OOjs UI: Backport Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 14 Dec 2017 22:56:40 +0000 (23:56 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 14 Dec 2017 22:56:40 +0000 (23:56 +0100)
Bug: T182359
Bug: T182395
Change-Id: I764a96780e418830e5c92ec57c50f549951ff47f

resources/lib/oojs-ui/oojs-ui-core.js

index e0d165f..b3a9012 100644 (file)
@@ -4832,7 +4832,7 @@ OO.ui.mixin.ClippableElement.prototype.setIdealSize = function ( width, height )
  * @return {string} 'left' or 'right'
  */
 OO.ui.mixin.ClippableElement.prototype.getHorizontalAnchorEdge = function () {
-       if ( this.computePosition && this.computePosition().right !== '' ) {
+       if ( this.computePosition && this.positioning && this.computePosition().right !== '' ) {
                return 'right';
        }
        return 'left';
@@ -4854,7 +4854,7 @@ OO.ui.mixin.ClippableElement.prototype.getHorizontalAnchorEdge = function () {
  * @return {string} 'top' or 'bottom'
  */
 OO.ui.mixin.ClippableElement.prototype.getVerticalAnchorEdge = function () {
-       if ( this.computePosition && this.computePosition().bottom !== '' ) {
+       if ( this.computePosition && this.positioning && this.computePosition().bottom !== '' ) {
                return 'bottom';
        }
        return 'top';