Closed HOTAPIYC closed 2 years ago
mouseEnterHandler
is for the content element, the activator listeners are defined here:
https://github.com/vuetifyjs/vuetify/blob/25e80a11d4e61e5ceef8659e24b8c63c39f8469b/packages/vuetify/src/mixins/activatable/index.ts#L103-L110
You can also just use v-model
instead of calling private methods on the component instance.
Thanks for the quick response! I am also not so happy with calling private methods, however v-model
is not solving the problem - it is then impossible to select anything from the menu, as it will close immediately when leaving the activator. With your hint though could restore the functionality as desired.
Environment
Vuetify Version: 2.5.14 Vue Version: 2.6.11 Browsers: Chrome 91.0.4472.114 OS: Windows 10
Steps to reproduce
Hover over the activator to show the menu.
Expected Behavior
The menu shows when hovering over the activator.
Actual Behavior
An error is thrown: "Cannot read property 'contains' of undefined."
Reproduction Link
https://codesandbox.io/s/custom-menu-activator-1om2b
Other comments
The intent of this setup is to take advantage of the
open-on-hover
attribute while separating the activator and the menu component in two separated components.This used to work in Vuetify 1.5. The issue is the
mouseEnterHandler
, of thev-menu
component. Within this method, the linethis.isActive = true;
was dropped. When manually restoring this, everything is fine.