From 75262b716fcae16920a75ade4c2cd3bc1c2e88da Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 15 Nov 2023 23:43:31 +0100 Subject: [PATCH] fix(kanban): opening a task from the kanban board and then reloading the page should not crash everything when then navigating back Before this fix, the following would not work: 1. Open the kanban view of a project 2. Click on a task to open it in a modal 3. Reload the page 4. Using your browser's back button, navigate back Instead of showing the kanban board with the task modal closed, it would navigate to `/projects/0/kanban` and crash. --- src/components/home/contentAuth.vue | 2 +- src/composables/useRouteWithModal.ts | 19 ++++++++++++------- src/router/index.ts | 6 +++++- src/views/project/ProjectKanban.vue | 24 ++++++++++++++---------- 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/src/components/home/contentAuth.vue b/src/components/home/contentAuth.vue index 31750963..540892e2 100644 --- a/src/components/home/contentAuth.vue +++ b/src/components/home/contentAuth.vue @@ -39,7 +39,7 @@ import('@/views/migrate/MigrationHandler const ProjectList = () => import('@/views/project/ProjectList.vue') const ProjectGantt = () => import('@/views/project/ProjectGantt.vue') const ProjectTable = () => import('@/views/project/ProjectTable.vue') -const ProjectKanban = () => import('@/views/project/ProjectKanban.vue') +// If we load the component async, using it as a backdrop view will not work. Instead, everything explodes +// with an error from the core saying "Cannot read properties of undefined (reading 'parentNode')" +// Of course, with no clear indicator of where the problem comes from. +// const ProjectKanban = () => import('@/views/project/ProjectKanban.vue') +import ProjectKanban from '@/views/project/ProjectKanban.vue' const ProjectInfo = () => import('@/views/project/ProjectInfo.vue') // Project Settings diff --git a/src/views/project/ProjectKanban.vue b/src/views/project/ProjectKanban.vue index 0af6e9c5..832b017a 100644 --- a/src/views/project/ProjectKanban.vue +++ b/src/views/project/ProjectKanban.vue @@ -1,7 +1,7 @@