Skip to content

Commit bf2429e

Browse files
authored
Default to 'Run on Click' for Linux embeds (codesandbox#474)
1 parent 906e217 commit bf2429e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/common/url.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ export const getSandboxOptions = (url: string) => {
5252
result.enableEslint = url.includes('eslint=1');
5353
result.forceRefresh = url.includes('forcerefresh=1');
5454
result.expandDevTools = url.includes('expanddevtools=1');
55-
result.runOnClick = url.includes('runonclick=1');
55+
result.runOnClick = url.includes('runonclick=0')
56+
? false
57+
: url.includes('runonclick=1') ||
58+
navigator.appVersion.indexOf('X11') !== -1 ||
59+
navigator.appVersion.indexOf('Linux') !== -1;
5660

5761
return result;
5862
};

0 commit comments

Comments
 (0)