microsoft / microsoft/monaco-editor
[Bug] alwaysConsumeMouseWheel property does not seem to work on mobile
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not 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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Next JS component using Monaco Editor and the scrollbar option alwaysConsumeMouseWheel. Reproduce the behavior on a mobile device or browser context, then compare it with desktop behavior; done means the issue has concrete reproduction steps, expected behavior, and a verified result for mobile scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, next.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100