iframe resizing breaks with instant navigation
Closed this issue · 2 comments
andreasknoepfle commented
When turning on instant loading from mkdocs material and the first page that is visited does not contain any swagger ui tags, the resize handler breaks, since the function is not defined on the parent page.
plugins:
- swagger-ui-tag
theme:
name: material
features:
- navigation.instant
This is the error that is raised:
Uncaught TypeError: parent.update_swagger_ui_iframe_height is not a function
at ResizeObserver.<anonymous> (swagger-df07ce82.html:69:14)
It is not a race condition, since the update_swagger_ui_iframe_height
is never defined. Once a full page refresh is done, the function is there again, and subsequent pages will have it.
The current workaround for us is to disable navigation.instant
, but could this be solved in a better way?
Thanks for creating this 💚
Cheers
Andi
blueswen commented
@andreasknoepfle Sorry for the late reply, this has been fixed in the newest version(v0.5.2). Could you check if this does solve your document error?
andreasknoepfle commented