Closed angrytongan closed 4 years ago
Tooltip is not displayed when hovering over a disabled Button. Not sure if this is desired behaviour or not.
Tooltip
Button
'use strict'; const { Button, FocusManager, Select, Tooltip, } = CUI; FocusManager.showFocusOnlyOnTab(); const DisabledButtonNoTooltip = () => { return { view: () => { return m('', [ m(Tooltip, { content: 'No tooltip on disabled button', trigger: m(Button, { label: 'A disabled button', disabled: true, }), }), m(Tooltip, { content: 'Tooltip on disabled button', trigger: m(Button, { label: 'An enabled button', disabled: false, }), }), ]); }, }; };
Yeah, disabled elements in general don't trigger any DOM events. Setting class="cui-disabled" can be used as a work around as seen in this example.
disabled
class="cui-disabled"
No worries. Thanks for the quick response!
Tooltip
is not displayed when hovering over a disabledButton
. Not sure if this is desired behaviour or not.