question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] ClickOutside of a `v-menu` triggers another non-related `v-on:click`

See original GitHub issue

Versions and Environment

Vuetify: 1.2.4 Vue: 2.5.17 Browsers: Firefox 62 & Chromium 69 OS: Chakra Linux

Steps to reproduce

  v-app
    v-content
      v-container
        .outside(@click='msg("outside")')  // [2] Then click here, the v-menu closed though, outside's @click also be trigger
          .STOP-EVENT(@click.stop="msg('v-btn to open a v-menu')")
            v-menu(@click.stop="msg('this did not work')")
              v-btn(slot="activator") .......  // [1] Click this, v-menu opened
              v-list ........

Expected Behavior

When a v-menu is opened, clicking outside of it should only close that v-menu only, without triggering any other v-on:click on the web page. (This is also the expected behavior of an Android application)

Actual Behavior

Clicking outside when a v-menu is opened, though the v-menu is closed successfully, but will also accidentally trigger unrelated click event listener.

Reproduction Link

This is a real world demo: https://codepen.io/anon/pen/jemoPm?editors=1011

This is a minimalist demo: https://codepen.io/anon/pen/WaOYEy?editors=1111


Additional Comments:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
manueltabercommented, Oct 26, 2018

Really need this feature, since in a form with a lot of buttons it’s difficult to close the menu. On Android this is the default behaviour…

1reaction
KaelWDcommented, Nov 22, 2018

That also doesn’t follow their own guidelines. You can use menu-props="offsetY" to prevent the overlap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

if/else block with button clicked events that defy my wishes
up on clicking outside the name input, it triggers onblur event that run another funciton to add an input to enter the price...
Read more >
`rootClose` not working correctly with text input · Issue #125
I'm using Overlay to show a menu when users click into a text input, with rootClose set to hide the menu if users...
Read more >
Bug 1215376 - Implement onBeforeShow event
Short workflow description: 1) add a mousedown|contextmenu listener on the content DOM 2) the listener generates data based on event target 3) data...
Read more >
button onclick or default form custom react
In React, the onClick handler allows you to call a function and perform an action when an element is clicked. onClick is the...
Read more >
Issues List: /home
Clear Filter; Remove Column; Summary Statistics... Bar Chart; Pie Chart ... 46238, Defect, Custom Menu Does Not Render Properly on R Report Page,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found