[PR #1997] [MERGED] fix(editor): prevent TypeError when typing mentions in comments #3856

Closed
opened 2026-03-22 14:55:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/1997
Author: @kolaente
Created: 12/16/2025
Status: Merged
Merged: 12/16/2025
Merged by: @kolaente

Base: mainHead: fix-mention-comment-error


📝 Commits (1)

  • 39bb5a4 fix(editor): prevent TypeError when typing mentions in comments

📊 Changes

2 files changed (+81 additions, -2 deletions)

View changed files

📝 frontend/src/components/input/editor/mention/mentionSuggestion.ts (+2 -2)
frontend/tests/e2e/task/mention-in-comment.spec.ts (+79 -0)

📄 Description

Summary

  • Fix TypeError when typing @ mentions in task comments
  • Add null checks for component variable in mentionSuggestion.ts to handle race conditions where onUpdate or onKeyDown fire before onStart completes

Test plan

  • Type @username in a task comment - no errors should appear
  • Playwright tests pass for mention functionality
  • Linting passes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/1997 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 12/16/2025 **Status:** ✅ Merged **Merged:** 12/16/2025 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix-mention-comment-error` --- ### 📝 Commits (1) - [`39bb5a4`](https://github.com/go-vikunja/vikunja/commit/39bb5a4d851c4e5d24a24d669c25cd0435c4dcb1) fix(editor): prevent TypeError when typing mentions in comments ### 📊 Changes **2 files changed** (+81 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/input/editor/mention/mentionSuggestion.ts` (+2 -2) ➕ `frontend/tests/e2e/task/mention-in-comment.spec.ts` (+79 -0) </details> ### 📄 Description ## Summary - Fix TypeError when typing `@` mentions in task comments - Add null checks for `component` variable in `mentionSuggestion.ts` to handle race conditions where `onUpdate` or `onKeyDown` fire before `onStart` completes ## Test plan - [x] Type `@username` in a task comment - no errors should appear - [x] Playwright tests pass for mention functionality - [x] Linting passes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 14:55:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#3856