microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
39.88k stars 3.56k forks source link

[Bug] alwaysConsumeMouseWheel property does not seem to work on mobile #4348

Open gustavomm19 opened 8 months ago

gustavomm19 commented 8 months ago

Reproducible in vscode.dev or in VS Code Desktop?

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

<Editor
                  theme="my-theme"
                  value={code}
                  onChange={(value) => {
                    const currLanguage = { ...languages[i], code: value };
                    setLanguages([
                      ...languages.slice(0, i),
                      currLanguage,
                      ...languages.slice(i + 1),
                    ]);
                  }}
                  defaultLanguage={language}
                  height="300px"
                  options={{
                    borderRadius: '4px',
                    scrollbar: {
                      alwaysConsumeMouseWheel: false,
                    },
                    minimap: {
                      enabled: false,
                    },
                    cursorStyle: 'line',
                  }}
                  onMount={handleEditorDidMount}
                />

Reproduction Steps

No response

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

I am trying to create a small component in Next JS to write and read code, and I am using the Monaco Editor. I cant scroll over the window if the mouse is hovering on the editor, so I set this property editor.scrollbar.alwaysConsumeMouseWheel: false and it worked on desktop, but it doesn't seem to work for mobile. What can I do?

CGNonofr commented 8 months ago

Related to #4108