mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "ve.ui.MWCategoryPopupWidget: Fix popup positioning"
This commit is contained in:
commit
0c31c3c243
|
@ -184,13 +184,6 @@ ve.ui.MWCategoryPopupWidget.prototype.setDefaultSortKey = function ( value ) {
|
|||
* @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();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue