[FIX] website: editor: ignore spurious changes for editable content
Changes to contentEditable or attributeEditable attributes should not cause the corresponding section to be marked as dirty (oe_dirty). This would otherwise cause an extra editor save() for those, wrongly marking untouched templates as `noupdate`, and possibly triggering access right errors.
This commit is contained in:
parent
f8d5a6727d
commit
c76297c4f8
|
@ -1924,9 +1924,10 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch(m.type) {
|
switch(m.type) {
|
||||||
case 'attributes': // ignore .cke_focus being added or removed
|
case 'attributes':
|
||||||
// ignore id modification
|
// ignore special attributes and .cke_focus class being added or removed
|
||||||
if (m.attributeName === 'id') { return false; }
|
var ignored_attrs = ['id', 'contenteditable', 'attributeeditable']
|
||||||
|
if (_.contains(ignored_attrs, m.attributeName)) { return false; }
|
||||||
// if attribute is not a class, can't be .cke_focus change
|
// if attribute is not a class, can't be .cke_focus change
|
||||||
if (m.attributeName !== 'class') { return true; }
|
if (m.attributeName !== 'class') { return true; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue