From 008881666aaed7171d06eb32b1237d44139b4f72 Mon Sep 17 00:00:00 2001 From: Sarah Rietkerk <49178322+srietkerk@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:09:19 -0700 Subject: [PATCH] Editor snapshots: added extra check for mac and ios for allowing screenshots (#10247) * added extra check for mac and ios for allowing screenshots * add check for android as well --- pxtblocks/layout.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pxtblocks/layout.ts b/pxtblocks/layout.ts index a78a43a40e4..e374989b5c6 100644 --- a/pxtblocks/layout.ts +++ b/pxtblocks/layout.ts @@ -226,7 +226,9 @@ export function flow(ws: Blockly.WorkspaceSvg, opts?: FlowOptions) { } export function screenshotEnabled(): boolean { - return !pxt.BrowserUtils.isIE() + const disableForMacIos = pxt.appTarget.appTheme.disableFileAccessinMaciOs && (pxt.BrowserUtils.isMac() || pxt.BrowserUtils.isIOS()); + const disableForAndriod = pxt.appTarget.appTheme.disableFileAccessinAndroid && pxt.BrowserUtils.isAndroid(); + return !disableForMacIos && !pxt.BrowserUtils.isIE() && !disableForAndriod; } export function screenshotAsync(ws: Blockly.WorkspaceSvg, pixelDensity?: number, encodeBlocks?: boolean): Promise {