-
Notifications
You must be signed in to change notification settings - Fork 39
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
create component webView ignores layout considerations #1156
Comments
Looks like your test URL is https://www.google.com. However, they don't allow their site to be iframed, so you will see this same behavior if you tried to manually create a webview using that URL. I would make sure the test URL you are using will work using the manual webview method first. |
When we experimented with other URLs that did load correctly, they had the same layout problem, where the webview appeared at (0,0) behind the data interactive. |
Have you explicitly tried setting the position to 'top' or 'bottom'? |
It seems you have found a bug. The only other thing I would suggest would be to also set the dimensions of the plugin. Clearly it has some default value for them, but perhaps setting custom dimensions would trigger the code that calculates an appropriate position. See the example of the webview from the api: |
I tried adding the dimensions, and saw that the dimension correctly updated but the layout did not improve. |
Well, sounds like you found a bug in the API. @bfinzer does that seem correct? |
It certainly sounds like a bug. I'll try to investigate a bit later today and get back about it. On the plus side, assuming it is a bug, it should be one that's not difficult to fix in V2 and get into the next release build. |
I found a fix. Current CODAP build is 0710. Look for the fix in the next release. |
In phetsims/projectile-data-lab#233 (comment) @matthew-blackman and I wanted to create a web view programatically. We did so in a self-contained minimal reproducible example based on the NewRandomNumbers exemplar:
https://github.com/concord-consortium/codap-data-interactives/blob/master/NewRandomNumbers/random-numbers.js
We applied this patch:
And we observed that the created webView appears behind the data interactive, like so:
We found that web views created via Options => Display Web Page did respect other layout considerations. It was unclear what is causing the problem or how to correct or work around it.
The text was updated successfully, but these errors were encountered: