diff --git a/packages/frontend/src/components/FavoritePathsModal.vue b/packages/frontend/src/components/FavoritePathsModal.vue index ed762db..a652feb 100644 --- a/packages/frontend/src/components/FavoritePathsModal.vue +++ b/packages/frontend/src/components/FavoritePathsModal.vue @@ -150,8 +150,12 @@ const updatePosition = () => { // --- Click Outside Logic --- const handleClickOutside = (event: MouseEvent) => { + if (props.triggerElement && props.triggerElement.contains(event.target as Node)) { + return; + } + if (modalContentRef.value && !modalContentRef.value.contains(event.target as Node)) { - if (!showAddEditModal.value) { // Do not close if add/edit modal is open + if (!showAddEditModal.value) { closeModal(); } } @@ -223,7 +227,15 @@ onBeforeUnmount(() => {
-
-
- - {{ t('favoritePaths.loading', 'Loading favorites...') }} -
-
- - {{ searchTerm ? t('favoritePaths.noResults', 'No matching favorites found.') : t('favoritePaths.noFavorites', 'No favorite paths yet. Add one!') }} -
- + { @close="showAddEditModal = false" @save-success="() => { favoritePathsStore.fetchFavoritePaths(t); showAddEditModal = false; }" /> - + - +