mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-03-14 22:48:35 +03:00
- client: check touch events for tooltips
This commit is contained in:
parent
d154456ae5
commit
ce21514246
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue