vue-on-click-outside
vue-on-click-outside copied to clipboard
Fix a bug with mouseenter not being fired
In some cases when the target element is dynamically shown and the mouse is already over it - the mouseenter
is not triggered.
mouseover
is though, so this change fixes the issue.
hmm. could you provide me with a link, that reproduces the issue? I’m hesitant to use mouseover because it fires once for every child element. maybe it’s better to use the .contains()
check from the static strategy to fix this specific bug, but I have to look into that.
hmm I don't have a public link with an example.
In my case I have a avatar image and when you click on it a filepicker modal opens.
The file picker opens above the avatar image so your mouse is already over it hence no mouseenter
event is fired.
If I get time I can possibly mock something up on js fiddle if you need an example.
is the event firing for child elements a big problem? its a lightweight event - I guess it could cause a light performance hit if you have a lot of children and are mouse all over the place very quickly...
maybe instead of hard coding the event we make it a configurable option - defaulting to mouseenter
. Would that work for you?
What's the static strategy? I'm unfamiliar with that term.
Oh I just noticed the dynamic/static strategy functions - that's what you meant.
Just as a heads up: I’ll try to get back to your issue at the end of the week :)