You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening a max modal and inspecting the document.body you will see that clientHeight and offsetHeight are always 0.
The clientWidth and offsetWidth values are correct.
The only way you can get any sort of height estimate is to use window.opener.document.body.clientHeight instead, which is of course an incorrect value.
To Reproduce
Steps to reproduce the behaviour:
Make a variant="max" modal
Open the modal
Right click inspect and make sure you've selected the modal context
In the console type document.body.clientHeight and you will get a value of 0
In the console type document.body.clientWidth and you will see the correct value
You can see the parent pages details with window.opener.document.body.clientHeight
Expected behaviour
The document.body.clientHeight and related values should be the correct value inside of the max modal context.
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge @ cdn
Platform
OS: All
App: All
The text was updated successfully, but these errors were encountered:
I've already merged and moved on but please note this was not within the context of react in any way, it is only when using the vanilla ui-modal components in a plain old html document with the app bridge CDN script only.
Describe the bug
Opening a max modal and inspecting the document.body you will see that
clientHeight
andoffsetHeight
are always 0.The
clientWidth
andoffsetWidth
values are correct.The only way you can get any sort of height estimate is to use
window.opener.document.body.clientHeight
instead, which is of course an incorrect value.To Reproduce
Steps to reproduce the behaviour:
variant="max"
modaldocument.body.clientHeight
and you will get a value of 0document.body.clientWidth
and you will see the correct valuewindow.opener.document.body.clientHeight
Expected behaviour
The
document.body.clientHeight
and related values should be the correct value inside of the max modal context.Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@cdn
Platform
The text was updated successfully, but these errors were encountered: