codemirror / codemirror5

In-browser code editor (version 5, legacy)
http://codemirror.net/5/
MIT License
26.84k stars 4.97k forks source link

Mobile - scrolling / editing with inputStyle contenteditable jumps around #6308

Open elsigh opened 4 years ago

elsigh commented 4 years ago

Here's a gif from one of the demo pages.

Screen Recording 2020-06-09 at 7 33 30 AM

I've tried calling preventDefault() in a scrollCursorIntoView handler.

When I set inputStyle: textarea the scrolling/focus behavior works as expected from a user experience point of view. However with inputStyle: textarea it seems we cannot longpress and select text. So kind of stuck between a rock and a hard place =)

SKevo18 commented 3 years ago

Can confirm that this happens too, using Chrome for Android.

rogdevil commented 3 years ago

Hey, I have been assigned on gitpay to resolve this. Can you please assign it to me

rogdevil commented 3 years ago

also I need a proper description on how to reproduce the issue it would be a great help

elsigh commented 3 years ago

@rogdevil - you can repro like so: 1) Grab an Android phone 2) Visit any of the demos, but go for https://codemirror.net/demo/html5complete.html 3) Tap into the code's container and then scroll the page down and try to tap into a part of the code and notice that you can't get your tap to put the cursor where you're tapping - sometimes it jumps on me, sometimes it puts the cursor into completely the wrong place, sometimes it scrolls the whole page somewhere else. It's just really hard / frustrating to get your cursor to a specifically tapped spot.

rogdevil commented 3 years ago

yes, the bug occurs sometimes. do this same happens on the code in the repo?

elsigh commented 3 years ago

@rogdevil I don't understand your question, but you can reproduce this problem with this repository

WhatMeansGithub commented 3 years ago

This is still an issue. I have this issue on iOS when trying to tap or type or paste anything. It won't type where I want to but jumps somewhere randomly (usually top or middle of a command).

ghost commented 2 years ago

Hello there! Can I work on this issue? I have experience with CodeMirror.