- client: check touch events for tooltips
This commit is contained in:
parent
d154456ae5
commit
ce21514246
@ -22,11 +22,13 @@ const Tooltip = ({
|
||||
delayHide = HIDE_TOOLTIP_DELAY,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const touchEventsAvailable = 'ontouchstart' in window;
|
||||
|
||||
let triggerValue = trigger;
|
||||
let delayHideValue = delayHide;
|
||||
let delayShowValue = delayShow;
|
||||
|
||||
if (window.matchMedia(`(max-width: ${MEDIUM_SCREEN_SIZE}px)`).matches) {
|
||||
if (window.matchMedia(`(max-width: ${MEDIUM_SCREEN_SIZE}px)`).matches || touchEventsAvailable) {
|
||||
triggerValue = 'click';
|
||||
delayHideValue = 0;
|
||||
delayShowValue = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user