Closed angrytongan closed 2 years ago
Just checked the Popover
sample in the docs and it's the same there. Is this correct behaviour?
Yeah, that's intended behavior. The cui-active
and cui-popover-trigger-active
classes are added to the trigger when the tooltip/popover is toggled open.
I could add a triggerActiveClass
prop to the existing API to provide better control i.e.
m(Tooltip, {
content: 'Button is depressed while hovering',
triggerActiveClass: 'my-class', // or leave it empty to prevent any classes being added when active
trigger: m(Button, {
label: 'Depressed on hover',
}),
}),
No worries, no need to do more work. Cheers!
I think this should stay open, having the button depress on hover doesn't make much sense.
Adding a
Button
as trigger to aTooltip
renders the button as depressed on hover. Additional button without tooltip renders correctly on hover. Tested in latest Chrome on Mac OS X.Sample below; not sure if the use of
m()
as argument fortrigger
is valid.