Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoom failed at docusaurus version 2.0.0-beta.18 #11

Closed
qileq opened this issue Mar 30, 2022 · 3 comments
Closed

zoom failed at docusaurus version 2.0.0-beta.18 #11

qileq opened this issue Mar 30, 2022 · 3 comments

Comments

@qileq
Copy link

qileq commented Mar 30, 2022

When I click the image, I get a error message in Chrome console:
image

Then I check the image html code:
image

It's seems like refactor: extract MDX components #6989 modify image class name, then image zoom plugin failed.

  • docusaurus: 2.0.0-beta.18
  • medium-zoom: 1.0.6
@qileq qileq changed the title zoom failed at the docusaurus version 2.0.0-beta.18 zoom failed at docusaurus version 2.0.0-beta.18 Mar 30, 2022
@ataft
Copy link
Collaborator

ataft commented Apr 6, 2022

This looks like an issue with either docusaurus or medium-zoom. The plugin-image-zoom plugin is just passing the selector and options to mediumZoom:
https://github.com/flexanalytics/plugin-image-zoom/blob/master/src/zoom.js#L31

Perhaps debug what it's passing, and then what's going on in medium-zoom. I believe the error is from this line:
https://github.com/francoischalifour/medium-zoom/blob/master/src/medium-zoom.js#L326

@ntolia
Copy link

ntolia commented Aug 27, 2022

Ran into the same problem with Docusaurus 2.0.1. I discovered that if I remove the following medium-zoom options, the error does not occur.

          container: '#zoom-container',
          template: '#zoom-template',

@qileq
Copy link
Author

qileq commented Aug 28, 2022

Ran into the same problem with Docusaurus 2.0.1. I discovered that if I remove the following medium-zoom options, the error does not occur.

          container: '#zoom-container',
          template: '#zoom-template',

Yes, I'm success too, thank you very much! @ntolia

@qileq qileq closed this as completed Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants