lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.14k stars 1.77k forks source link

SVGs not scaled to max possible size in Chrome #681

Closed davidc closed 4 years ago

davidc commented 4 years ago

SVGs, being scalable, should be displayed at the maximum possible size in the lightbox.

Using Firefox this works as expected. In Chrome, the SVG in the lightbox is tiny, tinier even than the viewbox specified in the SVG.

Lightbox2 version 2.11.1 Problem occurs in Chrome latest but not Firefox latest. Windows 10

Example SVG: overview.zip

Relevant HTML:

<div>
    <a href="{% link img/network/overview.svg %}" data-lightbox="network" data-title="LONAP Network Overview" style="cursor: zoom-in">
        <img src="{% link img/network/overview.svg %}" alt="LONAP Network Overview" width="845" height="270"/>
    </a>
</div>

Here is how the lightbox looks in Chrome:

image

Here is how it looks (correctly) in Firefox:

image

May be related to #552 however I have upgraded beyond the version fixed in that issue.

davidc commented 4 years ago

Edge 44.18362.449.0 is also broken:

image

but Internet Explorer 11 is fine:

image

davidc commented 4 years ago

The page demonstrating the issue is now live - top image https://www.lonap.net/network

lokesh commented 4 years ago

Fixed in https://github.com/lokesh/lightbox2/releases/tag/v2.11.2