New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify trigger: 'mouseenter click' behaviour. #659
Modify trigger: 'mouseenter click' behaviour. #659
Conversation
- When both triggers, use mouseenter behaviour until reference element click. - On click, show the tippy, no longer hide on mouseleave. - Respect all pre-existing hideOnClick behaviour (true, false, 'toggle'). - Only toggle the tippy on clicking the reference element when hideOnClick='toggle'.
Thanks for the PR! Sorry for the delay, I will try and check this tonight. |
This is almost good, just
|
Ah, right - thank you for the feedback! I'll get back to this ASAP (probably the weekend). |
…d toggle the tippy). - Also, add an assertion to test that the tippy does not hide onmouseleave when the mouseenter and click triggers are specified, and the tippy has been shown via click.
Alright, I've addressed the |
Edit: nvm it works! The changes didn't get pulled in properly. |
Thanks for the review! I've made that renaming change. |
Thanks a lot! |
You bet! |
This is an implementation proposal for the changes required for the behaviour change proposed at #649. Currently, the
mouseenter
behaviour always overrides theclick
behaviour. At a high-level, the behaviour change here amounts to respecting themouseenter
behaviour only until the reference element is clicked. Then, the existing click behaviour is respected, until the tippy is hidden (e.g. as perhideOnClick
=true
||'toggle'
). Once hidden again, the existingmouseenter
behaviour is respected once more.Lower-level description:
trigger
s are specified, respect existing mouseenter behaviour until reference element is clicked.hideOnClick
behaviour (true, false, 'toggle').Only toggle the tippy on clicking the reference element when hideOnClick='toggle' (currently the tippy is always toggled on click (unlessThis conflicts with the preceding point, hence removed (see discussion below).hideOnClick
is set tofalse
).