# MacOS + WebView resize problem.

**URL:** <https://forums.solar2d.com/t/macos-webview-resize-problem/342181>\
**Category:** macOS Desktop\
**Created:** [November 28, 2016, 12:25pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181 "2016-11-28T12:25:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 12:25pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/1 "2016-11-28T12:25:30Z")

</div>

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.&nbsp;

Should I consider this a bug and send a bug report?

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 28, 2016, 5:40pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/2 "2016-11-28T17:40:32Z")

</div>

A bug report would be great.

Thanks

Rob

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 10:08pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/3 "2016-11-28T22:08:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 28, 2016, 10:30pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/4 "2016-11-28T22:30:58Z")

</div>

I don’t see a submission by searching for your email.

Rob

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 11:27pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/5 "2016-11-28T23:27:49Z")

</div>

I resubmitted the bug report but still no confirmation email…

Well the bug is quite easy to reproduce with this code:

```
-- main.lua&nbsp; local webView = native.newWebView( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) webView:request( "http://www.shakebrowser.net/resize.html" )

-- build.settings settings = { &nbsp; &nbsp; &nbsp;osx = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, }, &nbsp; &nbsp; &nbsp;}, &nbsp; &nbsp; &nbsp;orientation = { default = "landscapeRight", }, }

```

The webpage requested was created by me to demonstrate the problem.&nbsp;

It contains the following code:

```
&nbsp; &nbsp;\<!DOCTYPE html\> &nbsp; &nbsp; \<html\> &nbsp; &nbsp; \<body\> &nbsp; &nbsp; \<button onclick="resizeWin()"\>Resize window\</button\> &nbsp; &nbsp; \<button onclick="openWin()"\>Open new window\</button\> &nbsp; &nbsp; \<button onclick="moveWin()"\>Move window\</button\> &nbsp; &nbsp; \<script\>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function resizeWin() { window.resizeTo(250, 250);}&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function openWin() {window.open("", "", "width=100, height=100");} &nbsp; &nbsp; &nbsp; &nbsp; function moveWin() {window.moveBy(250, 250);} &nbsp; &nbsp; \</script\> &nbsp; &nbsp; \</body\> &nbsp; &nbsp; \</html\>
```

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 28, 2016, 11:40pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/6 "2016-11-28T23:40:50Z")

</div>

What form are you using to submit the bug?

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 11:41pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/7 "2016-11-28T23:41:43Z")

</div>

This one:&nbsp;

[https://developer.coronalabs.com/content/bug-submission](https://developer.coronalabs.com/content/bug-submission)

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 11:43pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/8 "2016-11-28T23:43:08Z")

</div>

And it shows a “thank you the bug was submitted page” after i hit the submit button

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 29, 2016, 8:26pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/9 "2016-11-29T20:26:29Z")

</div>

I believe our engineers actually addressed this in the next daily build.

Rob

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 29, 2016, 9:30pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/10 "2016-11-29T21:30:50Z")

</div>

That is great. Thanks

---

<div class="post-metadata">

**Author:** ![Perry\_Clarke](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@Perry\_Clarke](https://forums.solar2d.com/u/Perry_Clarke)\
**Post date:** [November 30, 2016, 5:18am UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/11 "2016-11-30T05:18:47Z")

</div>

Current browsers ignore these calls and Corona apps (and the Simulator) should too.

This will be fixed in [Daily Build](http://developer.coronalabs.com/downloads/daily-builds)&nbsp;CoronaSDK 2016.2995 or later.&nbsp;

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 30, 2016, 9:03am UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/12 "2016-11-30T09:03:37Z")

</div>

Thanks Perry.&nbsp;

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.&nbsp;

Anyway great to hear it is fixed in Corona.

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 28, 2016, 5:40pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/13 "2016-11-28T17:40:32Z")

</div>

A bug report would be great.

Thanks

Rob

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 10:08pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/14 "2016-11-28T22:08:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 28, 2016, 10:30pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/15 "2016-11-28T22:30:58Z")

</div>

I don’t see a submission by searching for your email.

Rob

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 11:27pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/16 "2016-11-28T23:27:49Z")

</div>

I resubmitted the bug report but still no confirmation email…

Well the bug is quite easy to reproduce with this code:

```
-- main.lua&nbsp; local webView = native.newWebView( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) webView:request( "http://www.shakebrowser.net/resize.html" )

-- build.settings settings = { &nbsp; &nbsp; &nbsp;osx = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; plist = { NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, }, &nbsp; &nbsp; &nbsp;}, &nbsp; &nbsp; &nbsp;orientation = { default = "landscapeRight", }, }

```

The webpage requested was created by me to demonstrate the problem.&nbsp;

It contains the following code:

```
&nbsp; &nbsp;\<!DOCTYPE html\> &nbsp; &nbsp; \<html\> &nbsp; &nbsp; \<body\> &nbsp; &nbsp; \<button onclick="resizeWin()"\>Resize window\</button\> &nbsp; &nbsp; \<button onclick="openWin()"\>Open new window\</button\> &nbsp; &nbsp; \<button onclick="moveWin()"\>Move window\</button\> &nbsp; &nbsp; \<script\>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function resizeWin() { window.resizeTo(250, 250);}&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function openWin() {window.open("", "", "width=100, height=100");} &nbsp; &nbsp; &nbsp; &nbsp; function moveWin() {window.moveBy(250, 250);} &nbsp; &nbsp; \</script\> &nbsp; &nbsp; \</body\> &nbsp; &nbsp; \</html\>
```

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 28, 2016, 11:40pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/17 "2016-11-28T23:40:50Z")

</div>

What form are you using to submit the bug?

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 11:41pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/18 "2016-11-28T23:41:43Z")

</div>

This one:&nbsp;

[https://developer.coronalabs.com/content/bug-submission](https://developer.coronalabs.com/content/bug-submission)

---

<div class="post-metadata">

**Author:** ![ojnab](https://forums.solar2d.com/user_avatar/forums.solar2d.com/ojnab/32/94_2.png) [@ojnab](https://forums.solar2d.com/u/ojnab)\
**Post date:** [November 28, 2016, 11:43pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/19 "2016-11-28T23:43:08Z")

</div>

And it shows a “thank you the bug was submitted page” after i hit the submit button

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [November 29, 2016, 8:26pm UTC](https://forums.solar2d.com/t/macos-webview-resize-problem/342181/20 "2016-11-29T20:26:29Z")

</div>

I believe our engineers actually addressed this in the next daily build.

Rob

[Next page](https://forums.solar2d.com/t/macos-webview-resize-problem/342181.md?page=2)
