Is it possible to change webView width during orientation handling?

I spent two hours yesterday trying to “tune” the positions after the webView is rotated.

I thought I could fine tune but finally I gave up. It’s really a bug.

(1) For Simulator, I could tune the positions so that webView can be rotated and put correctly in the screen. (but the algorithm is quite odd)

(2) I thought I could do the same for the device.

(3) Actual devices (I tested with iPhone 5S & iPad 3) behaves differently than Simulator after webView rotates. The webView in actual devices gets really funky when changing its width/height after changing its rotation property.

(4) Even without any orientation or rotation, simply changing webView width/height is screwing the webView content. (The content is stretched)

CONCLUSION

The conclusion is that current webView cannot support device orientation at all, no matter how.

I really hope this can be addressed as soon as possible. 

For a business app that supports orientation + webView, it’s a common practice but it’s not achievable via Corona right now.

Forget about any orientation or rotation, just one simple question

Changing width/height of webView currently screws the content, are you planning to fix this one or not? If it’s a technical constraint, please let me know that you are not going to fix this, so I can move on to something else.

Please. This has been bugging me continuously for two months.

Q: Can I use Corona for developing business apps?

A: Yes, of course.

Q: Does Corona support device orientation?

A: Yes, absolutely.

Q: Can I have an embedded web browser in my business app?

A: Yes, Corona has a webView component.

Q: Can my business app with a webView support orientation?

A: well… there are some bugs so …

Q: So?

A: …

Q: And?

A: …

Q: Should I use Corona to develop this kind of business app after all?

A: …

Q: Maybe I should not use Corona to develop this kind of business app?

A: …

Q: Maybe I should wait a bit?

A: …

Q: Maybe I shouldn’t wait and move on to something else?

A: …

@Corona

Please give me some hint if you are going to fix this problem or not, and probably how long?

I am seriously planning to discontinue my current business app or trying to get it to a next level.

This problem (bug) is really holding me back. This problem is very FUNDAMENTAL if an app with webView wants to support orientation!

I don’t know what to do next.

Please at least let me know if you are not going to fix it for a long time, then I will just discard the plan and move on to something else!

I asked engineering again on the status. I’ll update this thread when I know more.

Rob

@joe528, I will bring this up to the engineers. 

Rob

Consider this:

( a ) a business app with web browser   <----- common

( b ) a business app that supports orientation    <----- common

Now, a business app with web browser that supports orientation cannot be achieved by Corona SDK

I think this should be escalated to product managers to decide if this problem should be addressed or not (and when)

I saw build 2260 trying to fix the width/height changing problem of the webView, which is good, finally, thanks.

I was very excited to test it out, but soon I found it’s very obvious it introduced another bug. Now changing the webview width/height (no need to rotate at all) gives wrong width/height (probably due to scaling)… have you really tested it after the fix?!

The webView rotation problem is more complicated than that… there is another bug when playing a video in full-screen via webView. When a full-video is played via webView, rotate the device (don’t rotate it back), press DONE to end the video, the “system” width/height is messed up! 

Without fixing the second problem, webView orientation support is still a problem. Corona should understand and fix webView orientation problem as a whole.

Look, it’s very hard for us app developers to build customer base and to face the fierce market competition.

For a business app with webView, if I can support orientation, I believe my app retention rate can be doubled right away. Now when every day goes by, it’s a loss to me for not supporting orientation.

Before I started to use Corona, I did ask your sales if I could use Corona to build a business app with webView. Although I didn’t ask in such a detail that if webView orientation could be supported, but it was a straight-forward assumption that it could. Corona shouldn’t just treat them as regular bugs so it’s not something should be decided by the engineers but something that should be considered as a product-level plan. They are really very “obvious” & “fundamental” bugs that I don’t understand why Corona could generate them (& even generating a obvious regression bug in last fix attempt) and keep them exist for such a long time. 

Unless there is some technical constraint, if so, please just let me know, I can do some different planning such as using native coding. Do you really think I like to think about this issue every day? No, I don’t!

Joe, I feel your frustration.  Engineering is still trying to address this. 

Hi Rob,

I have tested the latest fix in build 2272, the good news is that the width/height issue is fixed for iOS device, but not for Android device. (I really don’t understand why the engineer didn’t test on Android device)

And, there is one more bug related to webView orientation I filed earlier, Case# 31803

It is a bug when playing a video in full-screen from the webView, rotate the device (don’t rotate back), click DONE to end the video (or wait for the video to finish and press DONE), the “system” width/height (such as display.contentHeight/display.contentWidth) are not updated to the current orientation even though there is an orientation event. Therefore, when exiting the video, the whole screen is messed up totally! 

Could you also help to let the engineers know? They need to fix both bugs “completely” in order for webView to support orientation.

I’ll let them know.  I don’t know when they can get to the other bug.  You can also reply to the bug report letting them know its still broken on Android and that will keep the bug active.

Rob

I just looked at the bug report and it specifically says it was tested on Android. 

I just verified that changing the webview width and
height (as in your latest test code) works find on both iPad Mini and
Galaxy Tab 3 7". This is with build 2275.

So you need to get build 2275 and try that.

Rob

It’s only a partial fix. (sign… just can’t do one step further?)

Android devices still have some problem in changing webView width/height.

It appears ok to change webView width/height but if you change more than once (using a timer delay), there is something wrong.

Or say, if a device orientation changes, changing webView width/height is still going to mess up webView. Try to rotate the device more than one time.

I have filed another bug report, Case 32270.

Does Corona has product-level manager, can I talk to him/her? It seems an endless road for webView orientation support. To report a bug, “I” test it, and find another bug. Repeat.

still waiting eagerly & deperately to know

Forget about any orientation or rotation, just one simple question

Changing width/height of webView currently screws the content, are you planning to fix this one or not? If it’s a technical constraint, please let me know that you are not going to fix this, so I can move on to something else.

Please. This has been bugging me continuously for two months.

Q: Can I use Corona for developing business apps?

A: Yes, of course.

Q: Does Corona support device orientation?

A: Yes, absolutely.

Q: Can I have an embedded web browser in my business app?

A: Yes, Corona has a webView component.

Q: Can my business app with a webView support orientation?

A: well… there are some bugs so …

Q: So?

A: …

Q: And?

A: …

Q: Should I use Corona to develop this kind of business app after all?

A: …

Q: Maybe I should not use Corona to develop this kind of business app?

A: …

Q: Maybe I should wait a bit?

A: …

Q: Maybe I shouldn’t wait and move on to something else?

A: …

I asked engineering again on the status. I’ll update this thread when I know more.

Rob

I saw build 2260 trying to fix the width/height changing problem of the webView, which is good, finally, thanks.

I was very excited to test it out, but soon I found it’s very obvious it introduced another bug. Now changing the webview width/height (no need to rotate at all) gives wrong width/height (probably due to scaling)… have you really tested it after the fix?!

The webView rotation problem is more complicated than that… there is another bug when playing a video in full-screen via webView. When a full-video is played via webView, rotate the device (don’t rotate it back), press DONE to end the video, the “system” width/height is messed up! 

Without fixing the second problem, webView orientation support is still a problem. Corona should understand and fix webView orientation problem as a whole.

Look, it’s very hard for us app developers to build customer base and to face the fierce market competition.

For a business app with webView, if I can support orientation, I believe my app retention rate can be doubled right away. Now when every day goes by, it’s a loss to me for not supporting orientation.

Before I started to use Corona, I did ask your sales if I could use Corona to build a business app with webView. Although I didn’t ask in such a detail that if webView orientation could be supported, but it was a straight-forward assumption that it could. Corona shouldn’t just treat them as regular bugs so it’s not something should be decided by the engineers but something that should be considered as a product-level plan. They are really very “obvious” & “fundamental” bugs that I don’t understand why Corona could generate them (& even generating a obvious regression bug in last fix attempt) and keep them exist for such a long time. 

Unless there is some technical constraint, if so, please just let me know, I can do some different planning such as using native coding. Do you really think I like to think about this issue every day? No, I don’t!