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

Change subject: ve.ui.MWCategoryPopupWidget: Fix popup positioning
......................................................................


ve.ui.MWCategoryPopupWidget: Fix popup positioning

Figuring out why it broke doesn't seem like a very interesting task,
so let's just throw the whole logic out and use OOjs UI PopupWidget's
new built-in ability to position itself relative to anything.

Bug: T163269
Change-Id: Ie464e4668001f4bc6151b40cef469937aa8c6e48
---
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
1 file changed, 1 insertion(+), 8 deletions(-)

Approvals:
  DLynch: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
index d5fa7f7..4ad25a7 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryPopupWidget.js
@@ -184,13 +184,6 @@
  * @param {ve.ui.MWCategoryItemWidget} item Category item
  */
 ve.ui.MWCategoryPopupWidget.prototype.setPopup = function ( item ) {
-       var pos = OO.ui.Element.static.getRelativePosition( item.$indicator, 
this.$element.offsetParent() );
-
-       // Align to the middle of the indicator
-       pos.left += item.$indicator.width() / 2;
-       // Position below the indicator
-       pos.top += item.$indicator.height();
-
-       this.$element.css( pos );
+       this.setFloatableContainer( item.$element );
        this.updateDimensions();
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie464e4668001f4bc6151b40cef469937aa8c6e48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: DLynch <dly...@wikimedia.org>
Gerrit-Reviewer: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@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