From cc62e9125d16a81fb8fc2e16d1085eb612866c6d Mon Sep 17 00:00:00 2001 From: thsparks Date: Fri, 25 Oct 2024 14:20:55 -0700 Subject: [PATCH 1/2] Re-enable intellisense on android --- pxteditor/monaco.ts | 16 +++++++--------- webapp/src/monaco.tsx | 3 +-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/pxteditor/monaco.ts b/pxteditor/monaco.ts index 5fa6f570d059..5078fdfbf2e2 100644 --- a/pxteditor/monaco.ts +++ b/pxteditor/monaco.ts @@ -93,7 +93,6 @@ function setupMonaco() { export function createEditor(element: HTMLElement): monaco.editor.IStandaloneCodeEditor { const inverted = pxt.appTarget.appTheme.invertedMonaco; const hasFieldEditors = !!(pxt.appTarget.appTheme.monacoFieldEditors && pxt.appTarget.appTheme.monacoFieldEditors.length); - const isAndroid = pxt.BrowserUtils.isAndroid(); let editor = monaco.editor.create(element, { model: null, @@ -120,15 +119,14 @@ export function createEditor(element: HTMLElement): monaco.editor.IStandaloneCod theme: inverted ? 'vs-dark' : 'vs', renderIndentGuides: true, accessibilityHelpUrl: "", //TODO: Add help url explaining how to use the editor with a screen reader - // disable completions on android quickSuggestions: { - "other": !isAndroid, - "comments": !isAndroid, - "strings": !isAndroid + "other": true, + "comments": true, + "strings": true }, - acceptSuggestionOnCommitCharacter: !isAndroid, - acceptSuggestionOnEnter: !isAndroid ? "on" : "off", - accessibilitySupport: !isAndroid ? "on" : "off" + acceptSuggestionOnCommitCharacter: true, + acceptSuggestionOnEnter: "on", + accessibilitySupport: "on" }); editor.layout(); @@ -262,4 +260,4 @@ function initTypeScriptLanguageDefinition() { noLib: true, mouseWheelZoom: false }); -} \ No newline at end of file +} diff --git a/webapp/src/monaco.tsx b/webapp/src/monaco.tsx index deef1efe7762..01177842f525 100644 --- a/webapp/src/monaco.tsx +++ b/webapp/src/monaco.tsx @@ -636,10 +636,9 @@ export class Editor extends toolboxeditor.ToolboxEditor { display(): JSX.Element { const showErrorList = pxt.appTarget.appTheme.errorList; - const isAndroid = pxt.BrowserUtils.isAndroid(); return ( -
+
{this.isVisible &&
From 81083c32ccdebb7cace77184f781c32ab6ffcfb3 Mon Sep 17 00:00:00 2001 From: thsparks Date: Fri, 25 Oct 2024 15:33:12 -0700 Subject: [PATCH 2/2] Remove android css entirely --- theme/monaco.less | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/theme/monaco.less b/theme/monaco.less index 3159fb0e3d94..1a2b767be5e5 100644 --- a/theme/monaco.less +++ b/theme/monaco.less @@ -378,18 +378,6 @@ z-index: @monacoHintsZIndex !important; } -#monacoEditorArea.android { - .monaco-editor .editor-widget { - display: none !important; - visibility: hidden !important; - } - - // on android, the cursor / text area overlay gets offset - textarea.inputarea { - margin-left: .5rem; - } -} - .line-numbers { display:none; } @@ -426,4 +414,4 @@ .pxt-view-zone { width: 100%; z-index: calc(@monacoFlyoutZIndex - 1); -} \ No newline at end of file +}