diff --git a/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/components/EditorToolbar.vue b/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/components/EditorToolbar.vue index 41e6f73add..0abd2b3f7c 100644 --- a/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/components/EditorToolbar.vue +++ b/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/components/EditorToolbar.vue @@ -535,7 +535,7 @@ window.addEventListener('resize', handleWindowResize, { passive: true }); } - document.addEventListener('click', handleClickOutside, { passive: true }); + document.addEventListener('mousedown', handleClickOutside, { passive: true }); }); onUnmounted(() => { @@ -544,7 +544,7 @@ } else { window.removeEventListener('resize', handleWindowResize); } - document.removeEventListener('click', handleClickOutside); + document.removeEventListener('mousedown', handleClickOutside); }); return { diff --git a/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/composables/useDropdowns.js b/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/composables/useDropdowns.js index 311d77706c..c66d8b2e5e 100644 --- a/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/composables/useDropdowns.js +++ b/contentcuration/contentcuration/frontend/shared/views/TipTapEditor/TipTapEditor/composables/useDropdowns.js @@ -93,7 +93,7 @@ export function useDropdowns() { }; onMounted(() => { - document.addEventListener('click', handleClickOutside); + document.addEventListener('mousedown', handleClickOutside); // Setup editor listener when component mounts setupEditorListener(); // Initial format detection @@ -101,7 +101,7 @@ export function useDropdowns() { }); onUnmounted(() => { - document.removeEventListener('click', handleClickOutside); + document.removeEventListener('mousedown', handleClickOutside); if (offTransaction) offTransaction(); });