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

[Bug Report] Closing dialog from parent component closes child dialog #9907

Closed
Webifi opened this issue Dec 6, 2019 · 2 comments
Closed
Assignees
Labels
C: VDialog T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke
Milestone

Comments

@Webifi
Copy link
Contributor

Webifi commented Dec 6, 2019

Environment

Vuetify Version: 2.1.11
Last working version: 2.1.10
Vue Version: 2.6.10
Browsers: Chrome 78.0.3904.108
OS: Windows 10

Steps to reproduce

  1. "Open DIalog 1".
  2. In Dialog 1, "Open Dialog 2".
  3. Close Dialog 2
  4. Notice that both dialog 1 and 2 close when only dialog 2 should close.

Issue is 2.1.11 to 2.1.13

Non-working example (Vuetify 2.1.11):
https://codepen.io/webifi/pen/RwNWgZL

Working example (Vuetify 2.1.10):
https://codepen.io/webifi/pen/rNaOwYN

Expected Behavior

Only the closed dialog should close.

Actual Behavior

Both dialogs close

Reproduction Link

https://codepen.io/webifi/pen/RwNWgZL

@ghost ghost added the S: triage label Dec 6, 2019
@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke and removed S: triage labels Dec 8, 2019
@KaelWD
Copy link
Member

KaelWD commented Dec 8, 2019

Duplicate of #9850 but they didn't have an example of it working before or an accurate version range. The only commit in 2.1.11 that touched VDialog was f11d845

@KaelWD
Copy link
Member

KaelWD commented Dec 25, 2019

Playground
<template>
  <v-container>
    <v-row
      justify="center"
    >
      <v-btn
        color="primary"
        class="ma-2"
        dark
        @click="dialog = true"
      >
        Open Dialog 1
      </v-btn>
      <v-btn
        color="primary"
        class="ma-2"
        dark
        @click="dialog2 = true"
      >
        Open Dialog 2
      </v-btn>
      <v-btn
        color="primary"
        class="ma-2"
        dark
        @click="dialog3 = true"
      >
        Open Dialog 3
      </v-btn>
      <v-switch v-model="persistent" label="Persistent"></v-switch>

      <v-dialog
        v-model="dialog"
        v-bind="{ persistent }"
        fullscreen
        hide-overlay
        transition="dialog-bottom-transition"
      >
        <v-card tile>
          <v-toolbar
            flat
            dark
            color="primary"
          >
            <v-btn
              icon
              dark
              @click="dialog = false"
            >
              <v-icon>mdi-close</v-icon>
            </v-btn>
          </v-toolbar>
          <v-card-text>
            <v-btn
              color="primary"
              dark
              class="ma-2"
              @click="dialog2 = !dialog2"
            >
              Open Dialog 2
            </v-btn>
          </v-card-text>

          <div style="flex: 1 1 auto;"></div>
        </v-card>
      </v-dialog>

      <v-dialog
        v-model="dialog2"
        max-width="500px"
      >
        <v-card>
          <v-card-title>
            Dialog 2
          </v-card-title>
          <v-card-text>
            <v-btn
              color="primary"
              dark
              @click="dialog3 = !dialog3"
            >
              Open Dialog 3
            </v-btn>
          </v-card-text>
          <v-card-actions>
            <v-btn
              color="primary"
              text
              @click="dialog2 = false"
            >
              Close
            </v-btn>
          </v-card-actions>
        </v-card>
      </v-dialog>
      <v-dialog
        v-model="dialog3"
        max-width="500px"
      >
        <v-card>
          <v-card-actions>
            <v-btn
              color="primary"
              text
              @click="dialog3 = false"
            >
              Close
            </v-btn>
          </v-card-actions>
        </v-card>
      </v-dialog>
    </v-row>
  </v-container>
</template>

<script>
  export default {
    data: () => ({
      dialog: false,
      dialog2: false,
      dialog3: false,
      persistent: false,
    })
  }
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDialog T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants