1. Go to node/add/article to add an article:
* The default format is Basic HTML
* The editing area is empty
2. Without adding anything inside CKEditor, switch text format to Full HTML
3. The alert message is shown:

"Changing the text format to Full HTML will permanently remove content that is not allowed in that text format.
Save your changes before switching the text format to avoid losing data."

Note that there is no content to be saved and there is nothing that can be destroyed at this moment. An unaware user will be surprised and confused. The alert message could be shown only when there is some content inside editor while switching input formats.

Comments

nod_’s picture

Issue tags: +JavaScript
wim leers’s picture

Title: Do not show an alert about changing formats when there is no content » Do not show a dialog about changing formats when there is no content
Assigned: Unassigned » wim leers
Category: Feature request » Task
Status: Active » Needs review
Issue tags: +Usability, +CKEditor in core, +Spark
StatusFileSize
new778 bytes

Agreed, this is very annoying.

nod_’s picture

StatusFileSize
new1.14 KB

I'd rather not duplicate code and introduce an early return. Works well other than that.

wim leers’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.24 KB

Better! Thanks :)

Only rerolled to make the code match the comment, so that it's a bit easier to understand.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: core-js-editor-format-2317821-4.patch, failed testing.

Status: Needs work » Needs review
wim leers’s picture

Status: Needs review » Reviewed & tested by the community

This patch only touches JS, hence the fails are bogus.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 34c7510 and pushed to 8.0.x. Thanks!

  • alexpott committed 34c7510 on 8.0.x
    Issue #2317821 by Wim Leers, nod_ | wwalc: Do not show a dialog about...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.