Fix autosave focus jump in card sidebar
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
This commit is contained in:
@@ -178,9 +178,16 @@ export default {
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentCard(newCard, oldCard) {
|
||||
if (newCard.id === oldCard.id) return
|
||||
this.focusHeader()
|
||||
currentCard: {
|
||||
handler(newCard, oldCard) {
|
||||
if (!newCard) {
|
||||
return
|
||||
}
|
||||
// Only refocus when actually switching cards, not during autosave updates
|
||||
if (!oldCard?.id || newCard.id !== oldCard.id) {
|
||||
this.focusHeader()
|
||||
}
|
||||
},
|
||||
},
|
||||
'currentCard.title': {
|
||||
immediate: true,
|
||||
|
||||
Reference in New Issue
Block a user