Steps:
- Enable low power mode
- Open a tab with form elements
- Enter some text into a form element, (like an input or text area)
- Switch tabs and wait
Expected:
Tabs with edited form elements don't get suspended.
Actual:
Tabs with edited form elements do get suspended. When you go back to the tab and it reactivates the form state is lost.
This happened to me when I was reviewing a pull request and switching between applications. I had some text in a comment (but not submitted), was checking the code in my terminal to be sure, when I got back to the PR my comment was gone.
Before a tab is suspended orion should check if there are any form elements with edited state. This is how tiny suspender works, and that works well: https://github.com/arifwn/TinySuspender
Tinysuspender attaches a listener to each input, I'm not sure if there's a lighter weight solution... https://github.com/arifwn/TinySuspender/blob/9b5631c2ec91a91732d24946fb68f57c54e5e05d/src/tiny-suspender/js/content.js#L53
Version 0.99.126.4.1-beta (WebKit 618.1.2)
Sonoma (14)