mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 04:43:18 +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 | ||
model | ||
provider | ||
routing | ||
ui | ||
mmv.ActionLogger.js | ||
mmv.api.js | ||
mmv.base.js | ||
mmv.bootstrap.autostart.js | ||
mmv.bootstrap.js | ||
mmv.bootstrap.less | ||
mmv.Config.js | ||
mmv.DurationLogger.js | ||
mmv.EmbedFileFormatter.js | ||
mmv.globals.less | ||
mmv.head.js | ||
mmv.HtmlUtils.js | ||
mmv.js | ||
mmv.lightboximage.js | ||
mmv.lightboxinterface.js | ||
mmv.lightboxinterface.less | ||
mmv.loaded.css | ||
mmv.Logger.js | ||
mmv.mixins.less | ||
mmv.performance.js | ||
mmv.ThumbnailWidthCalculator.js |