jenkins-bot has submitted this change and it was merged.

Change subject: Fix rendering of inspector for embedded buttons
......................................................................


Fix rendering of inspector for embedded buttons

Previously we assumed that embedded icons mean we weren't
dealing with an inspector, but that is not always the case
(e.g. MWExtensionInspector).

Bug: 52845
Change-Id: Ifc5b054568661cb9badf6d7991f512b81e649b36
---
M modules/ve/ui/ve.ui.Context.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js
index bfb96f8..7a3577b 100644
--- a/modules/ve/ui/ve.ui.Context.js
+++ b/modules/ve/ui/ve.ui.Context.js
@@ -260,12 +260,12 @@
        };
 
        if ( position ) {
+               $container = inspector ? this.inspectors.$ : this.$menu;
                if ( this.embedded ) {
                        focusableOffset = ve.Element.getRelativePosition(
                                focusedNode.$focusable, this.surface.$
                        );
                        focusableWidth = focusedNode.$focusable.outerWidth();
-                       $container = this.$menu;
                        position = { 'y': focusableOffset.top };
                        // RTL check for Page-level (CE)
                        if ( this.surface.view.getDir() === 'rtl' ) {
@@ -276,7 +276,6 @@
                                this.popup.align = 'right';
                        }
                } else {
-                       $container = inspector ? this.inspectors.$ : this.$menu;
                        this.popup.align = 'center';
                }
                this.$.css( { 'left': position.x, 'top': position.y } );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc5b054568661cb9badf6d7991f512b81e649b36
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to