francoischalifour / medium-zoom

🔎🖼 A JavaScript library for zooming images like Medium
https://medium-zoom.francoischalifour.com
MIT License
3.58k stars 161 forks source link

Feature/custome class #159

Closed Rabbitzzc closed 3 years ago

Rabbitzzc commented 3 years ago

Summary

Add z-index, try to keep the popover on top.

Result

codesandbox-ci[bot] commented 3 years ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 184fece080c3f261867abac76f5c3f6ca73067b8:

Sandbox Source
francoischalifour/medium-zoom: vanilla Configuration
francoischalifour commented 3 years ago

Hey, thanks for the contribution. Why do you need this change?

Rabbitzzc commented 3 years ago

Hey, thanks for the contribution. Why do you need this change?

Some webpages may have default z-index for some components, so in order to avoid manual changes, this PR was added (learned from practice)

francoischalifour commented 3 years ago

Since the overlay and the zoomed image are appended to the DOM last, this shouldn't happen in most of the cases—so a user-land fix seems appropriate here.

Thank you though!