Skip to content

fix: ignore click outside if component is being destroyed - #8470

Merged
johnleider merged 1 commit into
masterfrom
fix/6976-clickoutside-after-destroy
Aug 12, 2019
Merged

fix: ignore click outside if component is being destroyed#8470
johnleider merged 1 commit into
masterfrom
fix/6976-clickoutside-after-destroy

Conversation

@KaelWD

@KaelWD KaelWD commented Aug 12, 2019

Copy link
Copy Markdown
Member

fixes #6976

Markup:

Details
<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 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 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