construct-ui
construct-ui copied to clipboard
Tooltips don't fade on mobile
Tooltips don't fade on mobile. Tested on Safari on iOS.
const {
Button,
Tooltip
} = CUI;
const MobileButtonTooltipNoFade = {
view: () => {
return m('', [
m(Tooltip, {
content: 'this tooltip doesn\'t fade on mobile',
trigger: m(Button, {
label: 'Button',
}),
}),
]);
}
};
document.addEventListener('DOMContentLoaded', () => {
m.route(document.body, '/', {
'/': MobileButtonTooltipNoFade
});
});
Not sure if this is intended behaviour or not. Also not sure on accepted behaviour (the Material guidelines say to display for 1.5 seconds).
What device/ios version are you using?
Tested on Safari on iOS. Also in Chrome on Mac OS X using devtools mobile view.
Apologies for the delay, I tested the Tooltip component in Safari/Chrome on an iPad and I can't get it to open at all. I haven't implemented any touch events so I'm assuming it won't work correctly on mobile.
I took a look at how react material UI handles it. They have dedicated touchstart/touchend events to support mobile.
I'll keep this open for the future.