ojnab
1
I encountered a problem when using webviews in MacOS builds/Simulator
If the content of the webView is resized or moved with javascript code calls like:
window.resizeTo window.resizeBy window.moveTo window.moveBy
the whole application window of the MacOS application resizes/moves. Even if resizable is set to false in the build.settings.
This happens if eg. you press a facebook button (where the facebook login popup would normally appear)
Would be nice if this behaviour could be blocked.
Should I consider this a bug and send a bug report?
rob
2
A bug report would be great.
Thanks
Rob
ojnab
3
Hi Rob
I submitted a bug report right after your post, but I didn’t receive a confirmation email… so I am not sure it came through.
These emails are usually sent out automatically right away when the report was received right?
Just wondering if I should resubmit it.
Thanks, Jacob
rob
4
I don’t see a submission by searching for your email.
Rob
ojnab
5
I resubmitted the bug report but still no confirmation email…
Well the bug is quite easy to reproduce with this code:
-- main.lua local webView = native.newWebView( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) webView:request( "http://www.shakebrowser.net/resize.html" )
-- build.settings settings = { osx = { plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, }, }, orientation = { default = "landscapeRight", }, }
The webpage requested was created by me to demonstrate the problem.
It contains the following code:
\<!DOCTYPE html\> \<html\> \<body\> \<button onclick="resizeWin()"\>Resize window\</button\> \<button onclick="openWin()"\>Open new window\</button\> \<button onclick="moveWin()"\>Move window\</button\> \<script\> function resizeWin() { window.resizeTo(250, 250);} function openWin() {window.open("", "", "width=100, height=100");} function moveWin() {window.moveBy(250, 250);} \</script\> \</body\> \</html\>
rob
6
What form are you using to submit the bug?
ojnab
7
ojnab
8
And it shows a “thank you the bug was submitted page” after i hit the submit button
rob
9
I believe our engineers actually addressed this in the next daily build.
Rob
Current browsers ignore these calls and Corona apps (and the Simulator) should too.
This will be fixed in Daily Build CoronaSDK 2016.2995 or later.
ojnab
12
Thanks Perry.
Actually current version of Safari on MacOS don’t ignore these calls (unless you have more than one tab open).
Current versions of Chrome and Firefox ignore them.
Anyway great to hear it is fixed in Corona.
rob
13
A bug report would be great.
Thanks
Rob
ojnab
14
Hi Rob
I submitted a bug report right after your post, but I didn’t receive a confirmation email… so I am not sure it came through.
These emails are usually sent out automatically right away when the report was received right?
Just wondering if I should resubmit it.
Thanks, Jacob
rob
15
I don’t see a submission by searching for your email.
Rob
ojnab
16
I resubmitted the bug report but still no confirmation email…
Well the bug is quite easy to reproduce with this code:
-- main.lua local webView = native.newWebView( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) webView:request( "http://www.shakebrowser.net/resize.html" )
-- build.settings settings = { osx = { plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, }, }, orientation = { default = "landscapeRight", }, }
The webpage requested was created by me to demonstrate the problem.
It contains the following code:
\<!DOCTYPE html\> \<html\> \<body\> \<button onclick="resizeWin()"\>Resize window\</button\> \<button onclick="openWin()"\>Open new window\</button\> \<button onclick="moveWin()"\>Move window\</button\> \<script\> function resizeWin() { window.resizeTo(250, 250);} function openWin() {window.open("", "", "width=100, height=100");} function moveWin() {window.moveBy(250, 250);} \</script\> \</body\> \</html\>
rob
17
What form are you using to submit the bug?
ojnab
18
ojnab
19
And it shows a “thank you the bug was submitted page” after i hit the submit button
rob
20
I believe our engineers actually addressed this in the next daily build.
Rob