Merge pull request #139 from gorbiz/fix/disable-monaco-android

Disable Monaco editor on Android user agents
This commit is contained in:
Torsten Paul 2025-12-19 23:50:34 +01:00 • committed by GitHub
commit 95915f2fab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,8 @@ import FilePicker, { } from './FilePicker.tsx';
const isMonacoSupported = (() => { const isMonacoSupported = (() => {
const ua = window.navigator.userAgent; const ua = window.navigator.userAgent;
const iosWk = ua.match(/iPad|iPhone/i) && ua.match(/WebKit/i); const iosWk = ua.match(/iPad|iPhone/i) && ua.match(/WebKit/i);
return !iosWk; const android = ua.match(/Android/i);
return !(iosWk || android);
})(); })();
let monacoInstance: Monaco | null = null; let monacoInstance: Monaco | null = null;