jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398207 )

Change subject: ClippableElement: Fix JS error when Floatable is mixed in but 
disabled
......................................................................


ClippableElement: Fix JS error when Floatable is mixed in but disabled

Follow-up to I0d1846e4a68b, which called #computePosition without
checking if positioning was enabled.

Bug: T182359
Change-Id: Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988
---
M src/mixins/ClippableElement.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/mixins/ClippableElement.js b/src/mixins/ClippableElement.js
index 43c2220..512e5a8 100644
--- a/src/mixins/ClippableElement.js
+++ b/src/mixins/ClippableElement.js
@@ -204,7 +204,7 @@
  * @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';
@@ -226,7 +226,7 @@
  * @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';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad4a2fd1bd985b4924e5ef1f822e1ea81ce0a988
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope <r...@wikimedia.org>
Gerrit-Reviewer: VolkerE <volke...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to