blueswen / mkdocs-swagger-ui-tag

A MkDocs plugin supports adding Swagger UI to the page.
https://blueswen.github.io/mkdocs-swagger-ui-tag/
MIT License
75 stars 7 forks source link

Schema not being displayed properly when navigating to page via sidebar #2

Closed stephenjlevy closed 2 years ago

stephenjlevy commented 2 years ago

When loading a markdown page directly (when running via mkdocs serve), the schema shows up as expected, however, when navigating to that same page via the sidebar, only the first part of the schema is displayed. The chrome console shows the following error:

Uncaught TypeError: parent.update_swagger_ui_iframe_height is not a function at ResizeObserver.<anonymous> (swagger-ff203020.html:49:14)

Everything appears to work as expected when loading a built site, rather than using mkdocs serve.

blueswen commented 2 years ago

@stephenjlevy Sorry for the late replying. I can not reproduce the bug you described. Could you provide a sample mkdocs project with mkdocs.yml or a screen recording?

blueswen commented 2 years ago

@stephenjlevy Are you using the mkdocs-material theme and enable the Instant loading feature? I reproduced the same bug as you described with enabling Instant loading.

blueswen commented 2 years ago

@stephenjlevy Version 0.3.2 is compatible with mkdocs-material's Instant loading feature now. Maybe new version could solve your problem.