From b0ba7b26c71ffe055053e7b96adb1a04725b8077 Mon Sep 17 00:00:00 2001 From: "Nichols, Kieran" Date: Thu, 18 Jan 2024 08:05:04 -0500 Subject: [PATCH] chore: revert to using Platform.isMobile until CI testing environment is updated --- src/lib/core/utils/feature-detection.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/core/utils/feature-detection.ts b/src/lib/core/utils/feature-detection.ts index f6574aacc..8a0f8b34a 100644 --- a/src/lib/core/utils/feature-detection.ts +++ b/src/lib/core/utils/feature-detection.ts @@ -1,3 +1,5 @@ +import { Platform } from '@tylertech/forge-core'; + /** * Detects if the browser supports the `popover` attribute. * @returns {boolean} @@ -22,6 +24,8 @@ export function supportsElementInternalsAria(): boolean { * @returns {boolean} */ export function supportsHover(): boolean { - const canTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0; - return !canTouch; + // TODO: hover media query is not working in CI headless chrome, so we are using the Platform.isMobile flag for now. + // This should be reverted once we switch to using puppeteer or playwright for testing in CI. + // return window.matchMedia('(hover: hover)').matches; + return !Platform.isMobile; }