Skip to content

Commit

Permalink
use android instead of chromeos
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Nov 14, 2024
1 parent debdfb9 commit 5ba0cd5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion pxtblocks/monkeyPatches/gesture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function monkeyPatchGesture() {
// This patch effectively removes multitouch by ignoring all pointer events except for ones
// generated by the first pointer that is encountered. All pointerup events are still allowed
// through (see wrapHandler below)
if (!pxt.BrowserUtils.isChromeOS() || !pxt.BrowserUtils.isInGame()) {
if (!pxt.BrowserUtils.isAndroid() || !pxt.BrowserUtils.isInGame()) {
return;
}

Expand Down
4 changes: 0 additions & 4 deletions pxtlib/browserutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ namespace pxt.BrowserUtils {
return hasNavigator() && /Epiphany/i.test(navigator.userAgent);
}

export function isChromeOS(): boolean {
return hasNavigator() && /cros/i.test(navigator.userAgent);
}

export function isTouchEnabled(): boolean {
return typeof window !== "undefined" &&
('ontouchstart' in window // works on most browsers
Expand Down

0 comments on commit 5ba0cd5

Please sign in to comment.