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: ignore click outside if component is being destroyed #8470

Merged
merged 1 commit into from
Aug 12, 2019

Conversation

KaelWD
Copy link
Member

@KaelWD KaelWD commented Aug 12, 2019

fixes #6976

Markup:

<template>
  <div class="text-center">
    <v-menu offset-y v-if="$route.name === 'Page 1'">
      <template v-slot:activator="{ on }">
        <v-btn
          color="primary"
          dark
          v-on="on"
        >
          Dropdown
        </v-btn>
      </template>
      <v-list>
        <v-list-item
          v-for="(item, index) in items"
          :key="index"
          @click=""
        >
          <v-list-item-title>{{ item.title }}</v-list-item-title>
        </v-list-item>
      </v-list>
    </v-menu>
    <v-btn to="/page2">go</v-btn>
    <v-btn to="/page1">go</v-btn>
  </div>
</template>

<script>
  export default {
    data: () => ({
      items: [
        { title: 'Click Me' },
        { title: 'Click Me' },
        { title: 'Click Me' },
        { title: 'Click Me 2' },
      ],
    }),
  }
</script>

@KaelWD KaelWD added this to the v2.0.x milestone Aug 12, 2019
@johnleider johnleider added C: VMenu VMenu T: bug Functionality that does not work as intended/expected labels Aug 12, 2019
@johnleider johnleider merged commit 2ad27f6 into master Aug 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 11, 2019
@nekosaur nekosaur deleted the fix/6976-clickoutside-after-destroy branch October 18, 2020 13:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: VMenu VMenu T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Cannot read property 'contains' of undefined (in VMenu.js closeConditional)
2 participants