Merge pull request #2253 from aignatov-bio/ai-sci-4144-fix-autosave-for-chemical-drawings

Fix autosave for marvinJS in tinyMCE [SCI-4144]
This commit is contained in:
aignatov-bio 2019-12-09 16:03:56 +01:00 committed by GitHub
commit c05991be94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -315,7 +315,7 @@ var TinyMCE = (function() {
});
editor.on('blur', function(e) {
if ($('.atwho-view:visible').length) return false;
if ($('.atwho-view:visible').length || $('#MarvinJsModal:visible').length) return false;
setTimeout(() => {
if (editor.isNotDirty === false) {
$(editor.container).find('.tinymce-save-button').click();
@ -323,6 +323,7 @@ var TinyMCE = (function() {
$(editor.container).find('.tinymce-cancel-button').click();
}
}, 0);
return true;
});
editor.on('init', function(e) {