Unusual scrolling on some devices #1663

Open
opened 2026-01-23 07:14:22 +01:00 by kojoe-code · 3 comments
kojoe-code commented 2026-01-23 07:14:22 +01:00 (Migrated from github.com)

Describe the issue

On some devices, when a keyboard pops up upon clicking a blank line, it scrolls abnormally, even in the opposite direction, making the editor cursor invisible. (The right window in the first demonstration in the video). On some devices, it works normally (left window).

The demo code is as follows

import "./style.css";
import { javascript } from "@codemirror/lang-javascript";
import { monokai } from "@uiw/codemirror-themes-all";
import { EditorView, basicSetup } from "codemirror";

new EditorView({
	doc: "console.log('Hello, world!');\n".repeat(100),
	parent: document.getElementById("editor")!,
	extensions: [basicSetup, monokai, javascript()],
});

https://github.com/user-attachments/assets/871d2c61-9676-4cfc-8c14-47997fc99453

Browser and platform

Abnormal device: Xiaomi, Android version: 15 , System version: hyper os 3

_No respon

### Describe the issue On some devices, when a keyboard pops up upon clicking a blank line, it scrolls abnormally, even in the opposite direction, making the editor cursor invisible. (The right window in the first demonstration in the video). On some devices, it works normally (left window). The demo code is as follows ```javascript import "./style.css"; import { javascript } from "@codemirror/lang-javascript"; import { monokai } from "@uiw/codemirror-themes-all"; import { EditorView, basicSetup } from "codemirror"; new EditorView({ doc: "console.log('Hello, world!');\n".repeat(100), parent: document.getElementById("editor")!, extensions: [basicSetup, monokai, javascript()], }); ``` https://github.com/user-attachments/assets/871d2c61-9676-4cfc-8c14-47997fc99453 ### Browser and platform Abnormal device: Xiaomi, Android version: 15 , System version: hyper os 3 ### Reproduction link _No respon
kojoe-code commented 2026-01-23 09:54:45 +01:00 (Migrated from github.com)

To add, this may be related to cr, once in a while, when I paste the code into the editor, I see a red cr logo, even if it is not at the last line or the beginning of a line, as long as I click on this "cr", it will cause abnormal scrolling

Image
To add, this may be related to cr, once in a while, when I paste the code into the editor, I see a red cr logo, even if it is not at the last line or the beginning of a line, as long as I click on this "cr", it will cause abnormal scrolling <img width="956" height="430" alt="Image" src="https://github.com/user-attachments/assets/b11f648b-aa2c-4a11-9724-d742cf72d49a" />
bajrangCoder commented 2026-02-08 05:19:32 +01:00 (Migrated from github.com)

I have also faced it even on codemirror.net example with some content which can trigger scrolling on mobile

I have also faced it even on codemirror.net example with some content which can trigger scrolling on mobile
Autist1Coder commented 2026-02-23 21:39:35 +01:00 (Migrated from github.com)

Seems to only happen in Chrome (and any Chromium's dependents, including Brave, Opera, Samsung Internet, and Android WebView):
https://issues.chromium.org/issues/484891671

Seems to only happen in Chrome (and any Chromium's dependents, including Brave, Opera, Samsung Internet, and Android WebView): https://issues.chromium.org/issues/484891671
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/dev#1663
No description provided.