Description
The main graphics are offset vertically and when the button is clicked, there is a script error.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
It should work like on Mac and Linux
I had a look at that isssue:
There is indeed a vertical offset on Windows 10, I suspect due to the system's top bar being counted as part of the view port. One potential fix would be to add this offset on the config's height property in here for Windows only. https://github.com/wailsapp/wails/blob/7dd42f964b4998323668a17cddd64ecd11a67190/renderer_webview.go#L40
The script error is due to MSHTML (Windows webview) not supporting Promises which are used in the template in here: https://github.com/wailsapp/wails/blob/7dd42f964b4998323668a17cddd64ecd11a67190/cmd/templates/create-react-app/frontend/src/components/HelloWorld.js#L18
An easy fix would be to add this polyfill https://www.npmjs.com/package/core-js to the template's package.json and import it in the template's entrypoint.
Happy to send a PR for both issues if you think those fixes are good to go.
Thanks for spending time looking at this! I'm guessing that the offset bug is in the underlying WebView library. We could definitely add the fix, if it works. Let us know.
Nice catch on the promises. We do install this polyfill for the vuetify template so I'm good with this solution.
Most helpful comment
I had a look at that isssue:
There is indeed a vertical offset on Windows 10, I suspect due to the system's top bar being counted as part of the view port. One potential fix would be to add this offset on the config's height property in here for Windows only. https://github.com/wailsapp/wails/blob/7dd42f964b4998323668a17cddd64ecd11a67190/renderer_webview.go#L40
The script error is due to MSHTML (Windows webview) not supporting Promises which are used in the template in here: https://github.com/wailsapp/wails/blob/7dd42f964b4998323668a17cddd64ecd11a67190/cmd/templates/create-react-app/frontend/src/components/HelloWorld.js#L18
An easy fix would be to add this polyfill https://www.npmjs.com/package/core-js to the template's package.json and import it in the template's entrypoint.
Happy to send a PR for both issues if you think those fixes are good to go.