Environment
Vuetify Version: 3.11.6
Vue Version: 3.5.26
OS: Linux undefined (current)
Steps to reproduce
- Click on "First activator"
- Click on "Second activator"
- Click on "Big content"
Expected Behavior
First menu shouldn't close when clicking on "Big content"
Actual Behavior
First menu closes
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
"Big content" is only shown when "Second menu" is visible.
Click on "First menu" leads to the correct behavior, i.e. second menu closes but not the first.
This is caused by https://github.com/vuetifyjs/vuetify/blame/v3.11.6/packages/vuetify/src/components/VMenu/VMenu.tsx#L95
- The
isClickInsideElement is called after a setTimeout
- Since "Big content" was hidden, coordinates used in https://github.com/vuetifyjs/vuetify/blob/v3.11.6/packages/vuetify/src/util/helpers.ts#L738 are now outside of menu content
- It detects that menu is closed
Calling isClickInsideElement before setTimeout() should fix this, but I'm not sure why the setTimeout was used in the first place. The initial PR (#15018) doesn't talk about it, and next contributors used it as is.
Environment
Vuetify Version: 3.11.6
Vue Version: 3.5.26
OS: Linux undefined (current)
Steps to reproduce
Expected Behavior
First menu shouldn't close when clicking on "Big content"
Actual Behavior
First menu closes
Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
"Big content" is only shown when "Second menu" is visible.
Click on "First menu" leads to the correct behavior, i.e. second menu closes but not the first.
This is caused by https://github.com/vuetifyjs/vuetify/blame/v3.11.6/packages/vuetify/src/components/VMenu/VMenu.tsx#L95
isClickInsideElementis called after a setTimeoutCalling
isClickInsideElementbeforesetTimeout()should fix this, but I'm not sure why thesetTimeoutwas used in the first place. The initial PR (#15018) doesn't talk about it, and next contributors used it as is.