Skip to content

Commit

Permalink
chore: revert to using Platform.isMobile until CI testing environment…
Browse files Browse the repository at this point in the history
… is updated
  • Loading branch information
DRiFTy17 committed Jan 18, 2024
1 parent f4c8551 commit b0ba7b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/core/utils/feature-detection.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Platform } from '@tylertech/forge-core';

/**
* Detects if the browser supports the `popover` attribute.
* @returns {boolean}
Expand All @@ -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;
}

0 comments on commit b0ba7b2

Please sign in to comment.