diff --git a/VERSION b/VERSION index 3d05e8c..3c43d71 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.4.6 +6.4.7 diff --git a/play-life-web/package.json b/play-life-web/package.json index a54a81e..15cf321 100644 --- a/play-life-web/package.json +++ b/play-life-web/package.json @@ -1,6 +1,6 @@ { "name": "play-life-web", - "version": "6.4.6", + "version": "6.4.7", "type": "module", "scripts": { "dev": "vite", diff --git a/play-life-web/src/App.jsx b/play-life-web/src/App.jsx index 86b1645..ff29360 100644 --- a/play-life-web/src/App.jsx +++ b/play-life-web/src/App.jsx @@ -769,7 +769,7 @@ function AppContent() { // Проверяем, есть ли открытые модальные окна в DOM const taskDetailModal = document.querySelector('.task-detail-modal-overlay') const wishlistDetailModal = document.querySelector('.wishlist-detail-modal-overlay') - + // Если есть открытые модальные окна, не обрабатываем здесь - компоненты сами закроют их if (taskDetailModal || wishlistDetailModal) { return diff --git a/play-life-web/src/components/WishlistDetail.jsx b/play-life-web/src/components/WishlistDetail.jsx index 7754842..f940962 100644 --- a/play-life-web/src/components/WishlistDetail.jsx +++ b/play-life-web/src/components/WishlistDetail.jsx @@ -230,7 +230,7 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, p // закрываем модальные окна без удаления записей из истории // App.jsx сам обработает навигацию и заменит запись task-detail на task-form через replaceState // Запись wishlist-detail останется в истории, но экран будет закрыт - if (skipHistoryBack) { + if (skipHistoryBack === true) { // Сохраняем флаг перед сбросом const hadWishlistHistory = historyPushedForWishlistRef.current @@ -288,11 +288,12 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, p // Проверяем наличие модальных окон в DOM const taskDetailModal = document.querySelector('.task-detail-modal-overlay') const wishlistDetailModal = document.querySelector('.wishlist-detail-modal-overlay') - + // Используем refs для получения актуального состояния const currentTaskDetail = selectedTaskForDetailRef.current const currentWishlistId = wishlistIdRef.current - + + // Сначала проверяем вложенное модальное окно TaskDetail if (currentTaskDetail || taskDetailModal) { setSelectedTaskForDetail(null) @@ -303,7 +304,7 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, p } return } - + // Если открыто модальное окно WishlistDetail, закрываем его if (currentWishlistId || wishlistDetailModal) { if (onClose) {