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
iOS sometimes enter gets stuck #482
Comments
|
Can confirm happens on iOS. |
… on iOS To avoid a browser bug where Enter no longer does anything. FIX: Work around a Mobile Safari bug where, after backspacing out the last character on a line, Enter didn't work anymore. Issue codemirror/codemirror.next#482
|
Strange issue—after the backspace it gets in a state where the selection, when inspected from JS, looks fine, but Enter does absolutely nothing (no mutations reported at all). Attached patch forces a selection reset in situations that look like this, and seems to resolve the problem. |
|
Hey @marijnh, sorry for bothering, but it looks like we have some issues on Problem: It's not possible to make a new line after a semicolon. Demo: https://github.com/codemirror/codemirror.next/compare/master...bushev:bushev/typing-issue?expand=1 RPReplay_Final1620946642.MP4 |
…e on iOS FIX: Work around an issue where, after some types of changes, Mobile Safari would ignore Enter presses. Issue codemirror/codemirror.next#482
|
That appears to have been triggered by another situation (the editor mutating the DOM node that the selection points into). I was able to reuse a kludge for a different issue in Chrome, which occurs in the same circumstances. Could you see if attached patch helps for you? |
|
Hey @marijnh, I can confirm that the issue with adding a new line after a semicolon has been fixed. However, there are new issues:
I suspect it might be related to the lint package. Please, check out the video: RPReplay_Final1621296950.MP4 |
Otherwise it can collapse the line and cause different issues. Issue codemirror/codemirror.next#482 Issue codemirror/codemirror.next#481
They are now always triggered, even if the native behavior does nothing (which seems to happen a lot, especially with enter) or something completely nonsensical (which happens with backspace near uneditable widgets). Issue codemirror/codemirror.next#482 FIX: Make iOS enter and backspace handling more robust, so that platform bugs are less likely to break those keys in the editor.
|
That last problem was caused by the workaround for #481 . I've adjusted it in codemirror/view@8f6c989 . Was still seeing some brokenness around backspace when lint widgets were involved, which prompted codemirror/view@83bfe61 -- an attempt to make enter/backspace handling more robust on iOS. |
|
Hey @marijnh, I've tested view and lint from the main branches, and I'm still observing the following issue. After a semicolon removal, I can't add a new line. RPReplay_Final1621296950.MP4 |
|
I didn't manage to reproduce that. I don't have the Java linter you appear to be using, and creating a similar situation in JavaScript didn't cause the issue. |
|
Yeah, fortunately, I'm not able to reproduce it too on a fresh build. |
I suspect this is related to the auto-capitalization hacks happening when enter is being pressed.
RPReplay_Final1620293925.mp4
RPReplay_Final1620294580.mp4
The text was updated successfully, but these errors were encountered: