diff --git a/src/router/index.ts b/src/router/index.ts index a1f6a2e6..4a7f2c4f 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -51,6 +51,7 @@ import NamespaceSettingDelete from '../views/namespaces/settings/delete.vue' import FilterNew from '@/views/filters/FilterNew.vue' import FilterEdit from '@/views/filters/FilterEdit.vue' import FilterDelete from '@/views/filters/FilterDelete.vue' +import {setTitle} from '@/helpers/setTitle' const PasswordResetComponent = () => import('../views/user/PasswordReset.vue') const GetPasswordResetComponent = () => import('../views/user/RequestPasswordReset.vue') @@ -372,7 +373,14 @@ const router = createRouter({ path: '/lists/:listId/kanban', name: 'list.kanban', component: ListKanban, - beforeEnter: (to) => saveListView(to.params.listId, to.name), + beforeEnter: (to) => { + saveListView(to.params.listId, to.name) + // Properly set the page title when a task popup is closed + const listFromStore = store.getters['lists/getListById'](parseInt(to.params.listId)) + if(listFromStore) { + setTitle(listFromStore.title) + } + }, props: route => ({ listId: parseInt(route.params.listId as string) }), }, { diff --git a/src/views/list/ListKanban.vue b/src/views/list/ListKanban.vue index 70f2c0fc..b9851f31 100644 --- a/src/views/list/ListKanban.vue +++ b/src/views/list/ListKanban.vue @@ -235,12 +235,12 @@ import BucketModel from '../../models/bucket' import {mapState} from 'vuex' import Rights from '../../models/constants/rights.json' import {LOADING, LOADING_MODULE} from '@/store/mutation-types' -import ListWrapper from './ListWrapper' +import ListWrapper from './ListWrapper.vue' import FilterPopup from '@/components/list/partials/filter-popup.vue' import Dropdown from '@/components/misc/dropdown.vue' import {getCollapsedBucketState, saveCollapsedBucketState} from '@/helpers/saveCollapsedBucketState' import {calculateItemPosition} from '../../helpers/calculateItemPosition' -import KanbanCard from '@/components/tasks/partials/kanban-card' +import KanbanCard from '@/components/tasks/partials/kanban-card.vue' const DRAG_OPTIONS = { // sortable options diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index f6e73302..01087ec6 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -443,7 +443,7 @@ import {CURRENT_LIST} from '@/store/mutation-types' import {uploadFile} from '@/helpers/attachments' import ChecklistSummary from '../../components/tasks/partials/checklist-summary' import CreatedUpdated from '@/components/tasks/partials/createdUpdated' - +import { setTitle } from '@/helpers/setTitle' export default defineComponent({ name: 'TaskDetailView', @@ -575,7 +575,8 @@ export default defineComponent({ this.$store.commit('attachments/set', this.task.attachments) this.taskColor = this.task.hexColor this.setActiveFields() - this.setTitle(this.task.title) + await this.$nextTick() + setTitle(this.task.title) } finally { this.scrollToHeading() await this.$nextTick()