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
This commit is contained in:
Ed Sanders 2013-08-14 15:41:23 +01:00 committed by Jforrester
parent 599ad772ed
commit 79b3dbf386

View file

@ -260,12 +260,12 @@ ve.ui.Context.prototype.updateDimensions = function ( transition ) {
};
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 @@ ve.ui.Context.prototype.updateDimensions = function ( transition ) {
this.popup.align = 'right';
}
} else {
$container = inspector ? this.inspectors.$ : this.$menu;
this.popup.align = 'center';
}
this.$.css( { 'left': position.x, 'top': position.y } );