Skip to content

Commit

Permalink
fix(VMenu): activator should not return non Element nodes (#13774)
Browse files Browse the repository at this point in the history
Fixes #13755
  • Loading branch information
Tofandel committed Jun 14, 2021
1 parent d8a6cff commit 25e80a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vuetify/src/mixins/activatable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ export default baseMixins.extend({
activator = (e.currentTarget || e.target) as HTMLElement
}

this.activatorElement = activator
// The activator should only be a valid element (Ignore comments and text nodes)
this.activatorElement = activator?.nodeType === Node.ELEMENT_NODE ? activator : null

return this.activatorElement
},
Expand Down

0 comments on commit 25e80a1

Please sign in to comment.