Skip to content

Monaco cannot properly consume low-speed two finger scroll events #2623

@Chigusa0w0

Description

@Chigusa0w0

monaco-editor version: Self-hosted 0.26.1 & Monaco Playground 0.27.0
Browser: Edge 92
OS: Windows 20H2
Playground code that reproduces the issue:

  1. Navigate to https://microsoft.github.io/monaco-editor/playground.html

  2. Run the following code in the left panel of the playground.

monaco.editor.create(document.getElementById("container"), {
	value: "aaaa" + "\n".repeat(100) + "aaaa", // or any other value that makes the editor scrollable
	scrollbar: { alwaysConsumeMouseWheel: false }, // <- this option is necessary
	language: "text"
});
  1. Inspect page element <body>, set element.style overflow: unset; height: 3000px; (or any other value that makes the page scrollable)
    image

  2. Now, when scrolling in the right panel of the playground with trackpad two-finger scrolling, there is a chance that the whole page scrolls instead of the editor. (Although the editor still have some lines not yet displayed on the scrolling direction)

  3. This unexpected behavior has a higher reproduction chance when scrolling downward at low-speed. The browser's Inertial Scrolling may also trigger this behavior.

  4. This behavior cannot reproduce when alwaysConsumeMouseWheel: true. But with always...: true, the Monaco editor will not respond to low-speed two-finger scrolling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions