rpearce / react-medium-image-zoom

🔎 🏞 The original medium.com-inspired image zooming library for React (since 2016)
https://rpearce.github.io/react-medium-image-zoom/
BSD 3-Clause "New" or "Revised" License
1.82k stars 99 forks source link

Safari: Zoomable images make the body extend beyond the content #627

Open imalfect opened 4 days ago

imalfect commented 4 days ago

Description

When using react-medium-image-zoom for my images, a long blank space after the website's content apperars (below the footer), I diagnosed it is happening because of this module, specifically

<span data-rmiz-ghost="" style="height: 390px; left: 572px; width: 656px; top: 2994px;"><button aria-label="Expand image: Dashboards - Release Dashboard_06_25_2024.png" data-rmiz-btn-zoom="" type="button"><svg aria-hidden="true" data-rmiz-btn-zoom-icon="true" fill="currentColor" focusable="false" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z"></path></svg></button></span>

because of the styles of the expand.

height: 390px; left: 572px; width: 656px; top: 2994px;

This issue is exclusive to safari (I guess safari really is the internet explorer of web development nowadays lol), does not happen on other browsers. You can view an example here: https://kasmedia.com/article/kaspa-market-dashboard-2024-06-26-kaspa-on-chain-metrics-showing-signs-of-bullish-reversal

You can check another page that does not contained images with this package, and notice the issue does not happen there: https://kasmedia.com/article/the-silver-standard-rusty-kaspa-s-evolution-to-digital-excellence

I'm pretty sure it's just safari's problem, but if there's any solution to this problem that you're aware of, I'd be extremely grateful if you could share it.

Cheers.

rpearce commented 2 days ago

Thanks for the bug report! I'll need to look into why it's doing that when I get some time.

imalfect commented 2 days ago

Thank you very much, I really appreciate it!