mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
ve.ui.MWEducationPopupTool: Remove unnecessary manual popup positioning
OOjs UI Popups position themselves automatically relative to their $floatableContainer these days. Also added explicit `$floatableContainer: this.$element` in the config (although not strictly needed, since the parent node is used by default, this makes the code more robust in case we move the popup somewhere else in the DOM). Bug: T167751 Change-Id: Id4267fce6499a4c217f7dc1d18871c02dd078aee
This commit is contained in:
parent
5fbe84a4e6
commit
433e7b5069
|
@ -55,6 +55,7 @@ ve.ui.MWEducationPopupTool = function VeUiMwEducationPopupTool( config ) {
|
|||
);
|
||||
|
||||
this.popup = new OO.ui.PopupWidget( {
|
||||
$floatableContainer: this.$element,
|
||||
$content: $popupContent,
|
||||
padded: true,
|
||||
width: 300
|
||||
|
@ -79,10 +80,6 @@ ve.ui.MWEducationPopupTool = function VeUiMwEducationPopupTool( config ) {
|
|||
tool.$pulsatingDot.hide();
|
||||
tool.$stillDot.hide();
|
||||
tool.popup.toggle( true );
|
||||
tool.popup.$element.css( {
|
||||
left: tool.$element.width() / 2,
|
||||
top: tool.$element.height()
|
||||
} );
|
||||
$shield.remove();
|
||||
}
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue