mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-29 08:24:40 +08:00
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:
commit
c05991be94
1 changed files with 2 additions and 1 deletions
3
app/assets/javascripts/sitewide/tiny_mce.js
vendored
3
app/assets/javascripts/sitewide/tiny_mce.js
vendored
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue