WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#18048 closed defect (bug) (wontfix)

Ctrl+S draft save causes prompt on exit

Reported by: jakub.tyrcha Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: Cc:
PR Number:

Description

When you use the "save draft" button and leave the edit page, the "unsaved changes" prompt doesn't show up. However, when you save using Ctrl+S and leave - the prompt appears.

Attachments (1)

18048.diff (523 bytes) - added by solarissmoke 8 years ago.
Change dirtiness flag in rich editor on autosave

Download all attachments as: .zip

Change History (8)

#1 @ryanimel
8 years ago

  • Cc ryan@… added

I'm not aware of a keyboard shortcut that saves anything. I could be wrong, but I don't believe there is one.

In that case, the prompt is appearing because nothing has been saved. Because the shortcut didn't do anything.

#2 @jakub.tyrcha
8 years ago

Not true. There is a shortcut and as far as my research goes, it does save the content.

#3 @azaozz
8 years ago

Ctrl+S forces an autosave (which is JS driven) so it doesn't reset the browser's internal "textarea content has changed". This is only reset on form submit.

@solarissmoke
8 years ago

Change dirtiness flag in rich editor on autosave

#4 @solarissmoke
8 years ago

  • Keywords has-patch added; needs-patch removed

TinyMCE has a flag that we can use to override its internal dirtiness check when autosaving, see 18048.diff. This fixes the issue for me but probably needs someone more familiar with the JS to make sure it doesn't do anything unintended.

#5 @nacin
8 years ago

  • Keywords close added

Autosave doesn't save everything. You still need to press Save for the good stuff.

#6 @c3mdigital
6 years ago

  • Keywords close removed
  • Resolution set to wontfix
  • Status changed from new to closed

see comment:5

#7 @SergeyBiryukov
6 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.