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

Webview inside collapsible acts weirdly #438

Closed
benazir46 opened this issue May 30, 2022 · 1 comment
Closed

Webview inside collapsible acts weirdly #438

benazir46 opened this issue May 30, 2022 · 1 comment

Comments

@benazir46
Copy link

benazir46 commented May 30, 2022

I use a webview to load html, css and javascript content inside collapsible. The issue is, if the height of the webview changes and the collapsible's collapse state is false, the webview's height becomes zero. I have attached the source code and a video.

In my app, JS changes the webview height, but for simplicity I used a button to change the height manually here. A fix or a workaround would be greatly appreciated.

collapsible.zip

video.mp4
@benazir46 benazir46 changed the title Collapsible toggles if webview height changes Webview inside collapsible acts weirdly May 31, 2022
@benazir46
Copy link
Author

I got a solution: there is a containerStyle property in the react-native-webview. By setting flex: 0, position: 'relative', height: webviewHeight', the height never gets zero. I was confused because if I set the collapse state to false by default, I didn't have the issue. Anyways, I'm closing this.

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

1 participant