Opened 7 years ago
Closed 8 months ago
#39619 closed defect (bug) (worksforme)
Firefox 50 is showing old "View autosave" dialog
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.6.1 |
Component: | Autosave | Keywords: | close |
Focuses: | ui, javascript | Cc: |
Description
Using Wordpress 4.6.1. Works in Chrome. Only works from time to time in Firefox:
Steps to reproduce:
- Create new post
- Publish post
- Modify content and wait for autosaving
- Reload page
Expected result: Restore backup notice including restore backup button
Actual result: Autosave notice
After I debugged a little bit, I realized that Firefox is not able to delete the cookie 'wp-saving-post' by using wpCookies.remove('wp-saving-post'). It seems to work only when you specify the path: wpCookies.remove('wp-saving-post', '/app/wp-admin')
Attachments (2)
Change History (5)
#2
@
5 years ago
- Focuses javascript added
I can replicate this issue in Firefox 62 on WordPress v5.0-alpha-20181001.162241
Adding a path to wpCookies.remove
does remove the cookie and allows subsequent checks for post data in localstorage, for example:
wpCookies.remove( 'wp-saving-post', '/wp-admin' );
at
https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/wp/autosave.js#L458
We'd probably want to provide a path when setting the cookie, for example userSettings.url
, so we can use that same path when removing.
Actual Result