[wp-trac] [WordPress Trac] #28566: Add our own "Are you sure you want to leave this page?" message when possible
WordPress Trac
noreply at wordpress.org
Thu Apr 14 18:11:22 UTC 2016
#28566: Add our own "Are you sure you want to leave this page?" message when
possible
-------------------------+-----------------------------
Reporter: iseulde | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: ui
-------------------------+-----------------------------
Comment (by danieliser):
Another option here, maybe even an enhancement would be to use the new
navigator.sendBeacon function in chrome to auto save. IE user can enable
an auto save function in chrome that will auto save upon leaving the page.
Similar to onBeforeUnload but non blocking.
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon
Although it is currently a Chrome webkit only enhancement, this has
already been proposed in Mozilla and MS Cortana. Thus making it a good
option to consider now.
Here is an example how it can be used when supported or fallback to AJAX
non blocking request if not.
http://stackoverflow.com/questions/36291337/allowing-an-ajax-request-to-
finish-after-the-page-is-closed
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28566#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list