mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-28 10:00:18 +00:00
Place the metadata correctly before opening the lightbox
The issue was happening because the metadata div was placed without waiting for dom load. Also, the code ignored the fact that the window size might change between page load and when the lightbox is open. Change-Id: Ib44720a7f989803b3f59aebcd33e94f610f51325 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/141
This commit is contained in:
parent
4667c9a896
commit
b9eecfed28
|
@ -117,6 +117,11 @@
|
|||
$.scrollTo( 0, 0 );
|
||||
}
|
||||
|
||||
// Make sure that the metadata is going to be at the bottom when it appears
|
||||
// 83 is the height of the top metadata area. Which can't be measured by
|
||||
// reading the DOM at this point of the execution, unfortunately
|
||||
this.$postDiv.css( 'top', ( $( window ).height() - 83 ) + 'px' );
|
||||
|
||||
MLBInterface.prototype.attach.call( this, parentId );
|
||||
};
|
||||
|
||||
|
@ -147,8 +152,6 @@
|
|||
};
|
||||
|
||||
LIP.initializeInterface = function () {
|
||||
this.$postDiv.css( 'top', ( $( window ).height() - 83 ) + 'px' );
|
||||
|
||||
this.initializeHeader();
|
||||
this.initializeNavigation();
|
||||
this.initializeButtons();
|
||||
|
|
Loading…
Reference in a new issue