Skip to content

Commit

Permalink
fix(Listbox): handle currentElement not in dom on focusout (#1399)
Browse files Browse the repository at this point in the history
  • Loading branch information
vojvodics authored Oct 30, 2024
1 parent 025d7d3 commit eb4b1c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/radix-vue/src/Listbox/ListboxRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ provideListboxRootContext({
@focusout="async (event: FocusEvent) => {
const target = (event.relatedTarget || event.target) as HTMLElement | null
await nextTick()
if (highlightedElement && !currentElement.contains(target)) {
if (highlightedElement && currentElement && !currentElement.contains(target)) {
onLeave(event)
}
}"
Expand Down

0 comments on commit eb4b1c4

Please sign in to comment.