Closed
Bug 996754
Opened 12 years ago
Closed 8 years ago
User-terminated apps do not receive 'beforeunload' event
Categories
(Firefox OS Graveyard :: Runtime, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: potch, Unassigned)
References
Details
Expected behavior:
1) user closes app from app switcher (with x or swiping up)
2) app recieves 'beforeunload' event
Observed that beforeunload is not triggered.
| Reporter | ||
Updated•12 years ago
|
Component: General → Runtime
Comment 1•11 years ago
|
||
Hey Alive,
Maybe you can help here or point to the right direction?
In Messages app we're planning to do some cleanup (namely closing MessagePort for SharedWorker or BroadcastingChannel - when it's implemented) on "window.beforeunload\unload"... But seems that "beforeunload" doesn't work at all + "unload" isn't always fired if I close app through Task Manager.
By "doesn't work" I mean that I don't see any logs from "console.log" (I put some to beforeunload\unload handlers) in logcat.
Thanks!
Flags: needinfo?(alive)
Comment 2•11 years ago
|
||
This is a feature our gecko doesn't support, or you could call it a bug, please ask help from platform folks.
Flags: needinfo?(alive)
It looks like this bug is the reason I got no answers to http://stackoverflow.com/questions/26475769/what-api-events-are-triggered-when-closing-a-firefoxos-app/26790185#26790185
I strongly think that FxOS should support a beforeunload event, or implement some other way of detecting user close and giving the option to save essential data before closing.
Seeing Bug 910995 - [Camera] Video file is not properly closed when phone is restarted while recording -- I think it is also important that apps get a beforeunload event if the phone is to be powered off (or if the app is to be unloaded for any other reason). Does that need logging as a new bug, or is it sufficient to note the requirement here?
Comment 5•8 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•