WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 13 months ago

#39619 new defect (bug)

Firefox 50 is showing old "View autosave" dialog

Reported by: mar1in Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.6.1
Component: Autosave Keywords:
Focuses: ui, javascript Cc:
PR Number:

Description

Using Wordpress 4.6.1. Works in Chrome. Only works from time to time in Firefox:

Steps to reproduce:

  1. Create new post
  2. Publish post
  3. Modify content and wait for autosaving
  4. 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)

Screen Shot 2017-01-18 at 10.50.10 am.png (14.6 KB) - added by mar1in 3 years ago.
Actual Result
Screen Shot 2017-01-18 at 10.50.18 am.png (37.6 KB) - added by mar1in 3 years ago.
Expected result

Download all attachments as: .zip

Change History (4)

@mar1in
3 years ago

Expected result

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Autosave

#2 @ramonopoly
13 months 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.


Note: See TracTickets for help on using tickets.