diff --git a/app/assets/javascripts/sitewide/atwho_res.js b/app/assets/javascripts/sitewide/atwho_res.js index ad11d28e5..d7511f934 100644 --- a/app/assets/javascripts/sitewide/atwho_res.js +++ b/app/assets/javascripts/sitewide/atwho_res.js @@ -82,9 +82,9 @@ var SmartAnnotation = (function() { $currentAtWho.find(`.repository-object[data-object-id="${data.repository}"]`) .addClass('btn-primary').removeClass('btn-light'); } - if ($('.atwho-scroll-container')[0]) { + if ($('.atwho-scroll-container').last()[0]) { // eslint-disable-next-line no-new - new PerfectScrollbar($('.atwho-scroll-container')[0]); + new PerfectScrollbar($('.atwho-scroll-container').last()[0]); } }); return true; @@ -220,10 +220,6 @@ var SmartAnnotation = (function() { displayTimeout: 120000 }) .atwho(atWhoSettings('#')); - // .atwho(atWhoSettings('task#', FilterTypeEnum.TASK)) Waiting for better times - // .atwho(atWhoSettings('project#', FilterTypeEnum.PROJECT)) - // .atwho(atWhoSettings('experiment#', FilterTypeEnum.EXPERIMENT)) - // .atwho(atWhoSettings('sample#', FilterTypeEnum.REPOSITORY)); $(this).data('atwho-initialized', true); } diff --git a/app/javascript/packs/tiny_mce.js b/app/javascript/packs/tiny_mce.js index 863454cb4..4f32ea178 100644 --- a/app/javascript/packs/tiny_mce.js +++ b/app/javascript/packs/tiny_mce.js @@ -323,6 +323,7 @@ window.TinyMCE = (() => { .on('click', (event) => { event.preventDefault(); saveAction(editor); + SmartAnnotation.closePopup(); }); // After save action @@ -371,6 +372,8 @@ window.TinyMCE = (() => { updateScrollPosition(editorForm); if (options.onSaveCallback) { options.onSaveCallback($(selector).val()); } + + SmartAnnotation.closePopup(); }) .removeClass('hidden');