mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 12:53:24 +00:00
c594a5610a
Instead of setting the parent's height as max height of the <img> element, find the first parent which has a non-automatic height (that would be .mw-mmv-image-wrapper). With the old structure, the height of the parent element could be determined by the height of the image, which would then be written back into the max-height of the image, messing up the aspect ratio. I did not see this in the wild, but it was easy to reproduce by changing the timing of the resize handler (in particular, I tried to call the resize handler before loading the new resolution, to make the UI more responsive, and ran into this problem). This cannot happen anymore now. This also fix a bug on some browsers (IE 10, maybe iOS Safari) where the size of the image could be slightly larger than the available space, and the bottom of the image was obscured by the metadata panel. I am still not sure how exactly that happened, but it was related to the <img> parents with automatic heights having incorrect height. After making sure the <img> has a max-height derived from an element with non-automatic height, I cannot reproduce the bug on IE 10 anymore. Change-Id: I193aefc42e6d6072717643659a9e4c0c8b7c7e93 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/698 Bug: 66244 |
||
---|---|---|
.. | ||
img | ||
mmv.ui.canvas.js | ||
mmv.ui.canvas.less | ||
mmv.ui.canvasButtons.js | ||
mmv.ui.canvasButtons.less | ||
mmv.ui.categories.js | ||
mmv.ui.categories.less | ||
mmv.ui.description.js | ||
mmv.ui.fileUsage.js | ||
mmv.ui.fileUsage.less | ||
mmv.ui.js | ||
mmv.ui.metadataPanel.js | ||
mmv.ui.metadataPanel.less | ||
mmv.ui.metadataPanelScroller.js | ||
mmv.ui.metadataPanelScroller.less | ||
mmv.ui.permission.js | ||
mmv.ui.permission.less | ||
mmv.ui.progressBar.js | ||
mmv.ui.progressBar.less | ||
mmv.ui.reuse.dialog.js | ||
mmv.ui.reuse.dialog.less | ||
mmv.ui.reuse.download.js | ||
mmv.ui.reuse.download.less | ||
mmv.ui.reuse.embed.js | ||
mmv.ui.reuse.embed.less | ||
mmv.ui.reuse.share.js | ||
mmv.ui.reuse.share.less | ||
mmv.ui.reuse.shareembed.less | ||
mmv.ui.reuse.tab.js | ||
mmv.ui.reuse.utils.js | ||
mmv.ui.stripeButtons.js | ||
mmv.ui.stripeButtons.less | ||
mmv.ui.truncatableTextField.js | ||
mmv.ui.truncatableTextField.less |