Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Vdialog): additional undefined check #14582

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VDialog/VDialog.ts
Expand Up @@ -178,7 +178,7 @@ export default baseMixins.extend({
// Double nextTick to wait for lazy content to be generated
this.$nextTick(() => {
this.$nextTick(() => {
if (!this.$refs.content.contains(document.activeElement)) {
if (this.$refs.content !== undefined && !this.$refs.content.contains(document.activeElement)) {
this.previousActiveElement = document.activeElement as HTMLElement
this.$refs.content.focus()
}
Expand Down Expand Up @@ -225,7 +225,7 @@ export default baseMixins.extend({
// It isn't the document or the dialog body
![document, this.$refs.content].includes(target) &&
// It isn't inside the dialog body
!this.$refs.content.contains(target) &&
(this.$refs.content !== undefined && !this.$refs.content.contains(target)) &&
// We're the topmost dialog
this.activeZIndex >= this.getMaxZIndex() &&
// It isn't inside a dependent element (like a menu)
Expand Down