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
- Open a card in the Deck app
- Click in the description field to start editing
- Begin typing in the description
- Wait approximately 2-3 seconds for autosave to trigger
- 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:
-
Description autosave (src/components/card/Description.vue):
- Triggers
updateCardDesc action which updates the card in the store
- Also updates the
lastModified property via mutation
-
Card sidebar watcher (src/components/card/CardSidebar.vue:181-184):
watch: {
currentCard(newCard, oldCard) {
if (newCard.id === oldCard.id) return
this.focusHeader()
},
-
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
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
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
Root Cause Analysis
The issue appears to be in the interaction between:
Description autosave (
src/components/card/Description.vue):updateCardDescaction which updates the card in the storelastModifiedproperty via mutationCard sidebar watcher (
src/components/card/CardSidebar.vue:181-184):Store mutation (
src/store/card.js:~115):Vue.setto update card propertiesAdditional Context