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
This was tested with PWA installed on Chrome.
The disconnect is not called when the app is quit. On hardware M8 this is going to be less noticeable, but on headless Teensy, this means that autosave won't be executed.
Closing the window via the 'x' button in the window corner does seem to execute the autosave.
I don't know if there's another hook that could be used or a workaround that can be done in code.
The text was updated successfully, but these errors were encountered:
jakerr
changed the title
Disconnect call is skipped on Chrome when pop-ups are blocked
Disconnect call is skipped on Chrome pwa when quit.
Mar 8, 2022
I wasn't aware that the disable command triggered an autosave; I thought that it was mainly to tell the Teensy/M8 to stop generating and sending display commands over USB serial.
After doing a bit of looking around, I think it might make sense to use the visibilitychange event to send the enable/disable commands whenever the tab or window is shown or hidden. This is supposed to be a more reliable way of detecting a page being closed than the beforeunload event, although it will be fired in more cases than just closing the page.
I'll have to have more of a think about this and take a look into how the autosave works on the M8.
This was tested with PWA installed on Chrome.
The disconnect is not called when the app is quit. On hardware M8 this is going to be less noticeable, but on headless Teensy, this means that autosave won't be executed.
Closing the window via the 'x' button in the window corner does seem to execute the autosave.
I don't know if there's another hook that could be used or a workaround that can be done in code.
The text was updated successfully, but these errors were encountered: