You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, when using executeJavaScript(), it breaks the plugin ability to remember BrowserWindow frame positions and dimensions.
I also found other other cases where this also happens, but using executeJavaScript() was the only case that I found a kind of pattern.
Pattern exploration
I didn't yet figured out the cause here, but it seems to be consistent. It happens always on the same executeJavaScript() calls. Some work fine, some don't, but the ones that don't work are always the same ones and happen every time they are called.
At first I thought that it was related to the content I was passing (and it might actually be, I'm not sure yet), but I tried lots of different kinds (functions with zero, one, and multiple arguments, arguments being numbers, strings, and JSON stringified objects)
Results
Once this happens, it affects all new BrowserWindow instances (of the same plugin, at least), until Sketch restarts. Additionally, when using Safari's Devtools, it won't close automatically when the affected BrowserWindow and all subsequent BrowserWindows close.
There are no visible console errors (neither via webview DevTools or via Sketch DevTools), which I assume that this is breaking internally. I also tried looking for something meaningful via macOS Console, but although I see some errors, I can't really pinpoint anything related to the plugin or this package.
The text was updated successfully, but these errors were encountered:
Additionally, when using Safari's Devtools, it won't close automatically when the affected BrowserWindow and all subsequent BrowserWindows close.
That makes me think that there is a long-running script that isn't finished when closing the window - and so the instance isn't cleaned up, so never actually closed to remember its position.
Not sure why tho
Description
Sometimes, when using
executeJavaScript()
, it breaks the plugin ability to remember BrowserWindow frame positions and dimensions.I also found other other cases where this also happens, but using
executeJavaScript()
was the only case that I found a kind of pattern.Pattern exploration
I didn't yet figured out the cause here, but it seems to be consistent. It happens always on the same
executeJavaScript()
calls. Some work fine, some don't, but the ones that don't work are always the same ones and happen every time they are called.At first I thought that it was related to the content I was passing (and it might actually be, I'm not sure yet), but I tried lots of different kinds (functions with zero, one, and multiple arguments, arguments being numbers, strings, and JSON stringified objects)
Results
Once this happens, it affects all new BrowserWindow instances (of the same plugin, at least), until Sketch restarts. Additionally, when using Safari's Devtools, it won't close automatically when the affected BrowserWindow and all subsequent BrowserWindows close.
There are no visible console errors (neither via webview DevTools or via Sketch DevTools), which I assume that this is breaking internally. I also tried looking for something meaningful via macOS Console, but although I see some errors, I can't really pinpoint anything related to the plugin or this package.
The text was updated successfully, but these errors were encountered: