The MUI tooltip is very clunky on mobile. You have to really press down on the icon for the tooltip to trigger (1000ms). Can we make the tooltip on mobile activate on a slight tap as opposed to a long hold?
Did you check out the API documentation for the Tooltip? enterTouchDelay
might be what you're looking for.
@urirahimi It's by the specification. They encourage to wait around 700ms (measured using a stopwatch on the video), we wait for 1s:
https://github.com/mui-org/material-ui/blob/5718fadf50c40f6c5109d3dd25be1f9f05457355/packages/material-ui/src/Tooltip/Tooltip.js#L486
@urirahimi @eps1lon What do you think of a -300ms change on this delay?
50 seems alright for me, less feels unresponsive
@rbenzazon 50ms is not a long press.
The enterTouchDelay
of 1s makes sense when the tooltip is used to explain the functionality of a button that does some action. However, there is a use case where the tooltip is used as a purely informational element, in this case, we set the enterTouchDelay
to 0. The tooltip appears immediately after tapping the informational element.
@MKrupauskas Mind that the current default value is 700ms.
This confused me too. If the problem and solution are called out in the high-level tooltip docs, it'd be easier to discover.
Most helpful comment
Did you check out the API documentation for the Tooltip?
enterTouchDelay
might be what you're looking for.