MDL-79107 editor_tiny: Target correct element on editor removal

This commit is contained in:
Andrew Nicols
2023-09-01 09:06:39 +08:00
parent 5df9996f60
commit 10525085a3
3 changed files with 3 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -526,7 +526,7 @@ export const setupForTarget = async(target, options = {}) => {
editor.on('remove', ({target}) => {
// Handle removal of the editor from the map on destruction.
instanceMap.delete(target.targetElm);
target.dataset.fieldtype = null;
target.targetElm.dataset.fieldtype = null;
});
// If the editor is part of a form, also listen to the jQuery submit event.