-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor Jumps around on Mobile #5844
Comments
I am also experiencing this bug and it makes for a very bad user experience. From my testing it seems that the editor is not always correctly setting the internal cursor position position ( The problem is, that sometimes the window.addEventListener('touchend', () => console.log('touchend'))
window.addEventListener('touchstart', () => console.log('touchstart')) Some googling led me to this unfixed Chromium bug, which could be causing this issue: When the target element of a The problem would then be, that CodeMirror removes elements from the DOM, that have been the target of As far as I can tell this is caused by
function updateDisplayIfNeeded(cm, update) {
var display = cm.display, doc = cm.cod;
...
...
// <+++ line=97>
// Bail out if there is a touch event in progress.
if (!update.force && cm.activeTouch !== null) {
return false;
}
// </+++>
...
...
} In my limited testing I could identify any problems with this approach, but I do not have the knowledge of CodeMirror to test it in every scenario. |
I haven't managed to reproduce this, unfortunately. But going by your analysis, which indicates that the display update is triggered by the touch event handler, would adding a line like (Aborting the touch handling would make the regular mouse events apply for the tap.) |
I'm experiencing this same bug consistently with Codemirror instances in Wiki.js and on the Codemirror demo page, along with the (maybe) related #6145 issues as shown in these videos. I couldn't get the screen recordings to attach, so the Vimeo links are below demonstrating aspects of the issue. https://vimeo.com/606720463 Comment #20 on Chromium Bugtracker suggests that Chromium is working as the spec intends. I don't see this issue with any other editors (such as this GitHub comment editor) |
Bumping this issue as it makes the editing experience on android pretty awful, and I see quite a few people experiencing this |
Doesn't seem isolated to Chrome mobile. I'm also seeing this issue on Android's Firefox mobile browser v96.3.0 |
Why this is still not fixed in 2022? It's nearly impossible for some mobile devices to use this software. |
Use CodeMirror 6 if you want more robust mobile support. Coming here and complaining is, unless you're paying me to maintain the software, entirely inappropriate. |
Complaining? This was a simple question related to a critical bug which exists for years. If you are not feeling responsible for critical bugs in your software, you better should stop maintaining open source software. |
All I can say is: Thank you, @marijnh, for creating and maintaining CodeMirror; it’s a splendid and impressive piece of software. As so often, it’s hard to earn rewards when doing things for free. |
Describe the bug
The cursor does not always remain where the user intends.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The cursor should remain in place
** Version information **
OS: Android
Browser: Chrome 73
The text was updated successfully, but these errors were encountered: