Skip to content

[Bug] Cursor jumps to title field when autosaving card description #7236

@hweihwang

Description

@hweihwang

Bug Description

When editing a card's description in the Deck app, the cursor unexpectedly jumps back to the card title field every time the description autosaves (approximately every 2.5 seconds). This makes it impossible to effectively edit card descriptions.

Steps to Reproduce

  1. Open a card in the Deck app
  2. Click in the description field to start editing
  3. Begin typing in the description
  4. Wait approximately 2-3 seconds for autosave to trigger
  5. Observe that focus jumps to the card title field

Expected Behavior

The cursor should remain in the description field during and after autosave, allowing continuous editing without interruption.

Actual Behavior

The cursor/focus jumps to the card title field every time autosave runs, forcing users to click back into the description field to continue editing.

System Information

  • Nextcloud version: 31.0.6 Enterprise
  • Deck app version: 1.15.2
  • Browser: Chrome (tested on Chrome 139.0.0.0)
  • Operating System: Various (reported on Linux)

Root Cause Analysis

The issue appears to be in the interaction between:

  1. Description autosave (src/components/card/Description.vue):

    • Triggers updateCardDesc action which updates the card in the store
    • Also updates the lastModified property via mutation
  2. Card sidebar watcher (src/components/card/CardSidebar.vue:181-184):

    watch: {
        currentCard(newCard, oldCard) {
            if (newCard.id === oldCard.id) return
            this.focusHeader()
        },
  3. Store mutation (src/store/card.js:~115):

    • Uses Vue.set to update card properties
    • The reactivity system may be causing the watcher to fire even for same-card updates

Additional Context

  • Issue reported by multiple users from the same organization
  • Significantly impacts productivity when working with cards
  • May affect accessibility for users relying on keyboard navigation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions