Opened 23 months ago
Last modified 18 months ago
#18048 new defect (bug)
Ctrl+S draft save causes prompt on exit
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch close |
| Cc: | ryan@… |
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)
Change History (6)
comment:2
jakub.tyrcha — 23 months ago
Not true. There is a shortcut and as far as my research goes, it does save the content.
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.
comment:4
solarissmoke — 21 months 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.

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.