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

e.jsEvaluationValue is undefined #1

Merged
merged 2 commits into from
Mar 15, 2017
Merged

e.jsEvaluationValue is undefined #1

merged 2 commits into from
Mar 15, 2017

Conversation

dima11221122
Copy link
Contributor

@dima11221122 dima11221122 commented Mar 1, 2017

Problem

Environment

In my application your package didn't work. When i debugged, i found that param e.jsEvaluationValue was null in method _updateWebViewHeight, maybe because react-native has bug.

Solution

I rewrote the communication between app and webView on postMessage/onMessage. I had problem with a notify through postMessage, but this comment helped me. Maybe you known better solution for it.

@scazzy
Copy link
Owner

scazzy commented Mar 5, 2017

thanks for raising @dima11221122 . Will test your PR

@scazzy scazzy self-assigned this Mar 5, 2017
@UrbanSam
Copy link

UrbanSam commented Mar 7, 2017

It works fine in android ! Even on android 4.4.4.
However in IOS, the height often way too long and creating empty space at bottom.

Solution

One way to fix this was change waitForBridge() to setTimeout(waitForBridge, 200)
And add a defaultHeight in defaultProps to some value much smaller than what your content is.

@dima11221122
Copy link
Contributor Author

Thanks @UrbanSam for testing on iOS. If i will set height in defaultProps and change waitForBridge() on setTimeout(waitForBridge, 200), then will this enough? Will it work on iOS?

@UrbanSam
Copy link

UrbanSam commented Mar 8, 2017

@dima11221122 Yup at least it works on my simulator. Will let you know if it works in actual device.

@UrbanSam
Copy link

UrbanSam commented Mar 8, 2017

@dima11221122 Yup it works fine on my Iphone 5s.

@dima11221122
Copy link
Contributor Author

I haven't forgotten about PR!) Now i'm busy, i fixed later

@scazzy scazzy merged commit c8e8247 into scazzy:master Mar 15, 2017
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

Successfully merging this pull request may close these issues.

3 participants