mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Added vertical margin in calculation of menu position
This commit is contained in:
parent
44f8d155b1
commit
f42915ac0f
|
@ -51,7 +51,7 @@
|
|||
}
|
||||
|
||||
.es-contextView-position-below .es-menuView {
|
||||
top: 3px;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.es-contextView-panels {
|
||||
|
|
|
@ -105,7 +105,7 @@ es.ContextView.prototype.set = function() {
|
|||
}
|
||||
$menu.css( 'left', menuLeft );
|
||||
// Position menu on top or bottom depending on viewport
|
||||
if ( position.top + menuHeight < windowHeight + windowScrollTop ) {
|
||||
if ( position.top + menuHeight + ( menuMargin * 2 ) < windowHeight + windowScrollTop ) {
|
||||
this.$.addClass( 'es-contextView-position-below' );
|
||||
} else {
|
||||
this.$.addClass( 'es-contextView-position-above' );
|
||||
|
|
Loading…
Reference in a new issue