mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
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:
parent
599ad772ed
commit
79b3dbf386
|
@ -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 } );
|
||||
|
|
Loading…
Reference in a new issue