Commit ff7fc0fd authored by alexpott's avatar alexpott
Browse files

Issue #2502617 by droplet, darol100: When changing from a text format with an...

Issue #2502617 by droplet, darol100: When changing from a text format with an editor to one without, any user-entered changes are ignored: the original text is saved
parent 5a231af7
......@@ -168,13 +168,11 @@
// When there is no text editor for this text format, still track changes,
// because the user has the ability to switch to some text editor, other-
// wise this code would not be executed.
else {
$(field).on('change.editor keypress.editor', function () {
field.setAttribute('data-editor-value-is-changed', 'true');
// Just knowing that the value was changed is enough, stop tracking.
$(field).off('.editor');
});
}
$(field).on('change.editor keypress.editor', function () {
field.setAttribute('data-editor-value-is-changed', 'true');
// Just knowing that the value was changed is enough, stop tracking.
$(field).off('.editor');
});
// Attach onChange handler to text format selector element.
if ($this.is('select')) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment