Quasar: Div nest div, two context menu appear at the same time, overlapped

Created on 24 Sep 2019  ·  4Comments  ·  Source: quasarframework/quasar

Describe the bug
Div nest div, they both have context-menu, When right click child element(inner div), both div context-menu appear overlapped.

Codepen/jsFiddle/Codesandbox (required)
https://codepen.io/andersonmin/pen/bGbzowb

To Reproduce
Steps to reproduce the behavior:

  1. Add a context menu to a div element,
  2. Add a div, make it a child to the div you add in step 1, add a context menu.
  3. right click child div, two context menu appear at the same time, overlapped

Expected behavior
When click child element, only child element context-menu should appear, should not include outside element context-menu

Screenshots
context-menu

Platform (please complete the following information):
OS:
Node:
NPM:
Yarn:
Browsers:
iOS:
Android:
Electron:

Additional context
Add any other context about the problem here.

bug

All 4 comments

Just add @touchstart.stop @mousedown.stop to the inner container of you want to prevent it, like here: https://codepen.io/pdanpdan/pen/mdbvBYd

Thanks.
It doesn't work. I click the link you sent, Still overlapped, two
context-menu.

On Tue, Sep 24, 2019 at 11:51 AM Popescu Dan notifications@github.com
wrote:

Just add @touchstart.stop @mousedown.stop to the inner container of you
want to prevent it, like here: https://codepen.io/pdanpdan/pen/mdbvBYd


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/quasarframework/quasar/issues/5135?email_source=notifications&email_token=ACSPCK6XW3B32S6SSRIX55DQLGFCXA5CNFSM4IZZ34FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7M7BNY#issuecomment-534376631,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACSPCK3VALFUSLDNKM4ITY3QLGFCXANCNFSM4IZZ34FA
.

--
Cheers
Anderson

For mouse it should have been @contextmenu.stop :)

https://codepen.io/pdanpdan/pen/mdbvBYd

❤️❤️❤️
Works great :)

Was this page helpful?
0 / 5 - 0 ratings