Skip to content

Commit 0f4341c

Browse files
committed
fix(NcListItem): correctly handle unmounting
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent 590b0c8 commit 0f4341c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/NcListItem/NcListItem.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,9 @@ export default {
776776
return
777777
}
778778
// do not hide if focus is kept within
779-
if (this.$refs['list-item'].contains(event.relatedTarget)) {
779+
// On component unmounting Vue 3 resets the template ref to null,
780+
// so we can ignore this check
781+
if (this.$refs['list-item']?.contains(event.relatedTarget)) {
780782
return
781783
}
782784
this.hideActions()

0 commit comments

Comments
 (0)