Skip to content
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

Space not registered in the html textarea on iPad #5367

Closed
marvindanig opened this issue Apr 20, 2018 · 5 comments
Closed

Space not registered in the html textarea on iPad #5367

marvindanig opened this issue Apr 20, 2018 · 5 comments

Comments

@marvindanig
Copy link

I have a codemirror instance that works fine on the desktop browser and nearly as good on the iPad Safari. The only quirk remaining is that the spaces aren't getting registered on iOS. Nothing happens when the spacebar is pressed on the keyboard, though occasionally it scrolls up a little bit.

I'm using the htmlmixed mode. Any clues to where I should be looking?

@beneboy
Copy link

beneboy commented Jul 6, 2018

I am also having this issue, works fine on Desktop with Safari but not iPad.

It appears that Space will scroll the window, so it is as if the space input it not being captured by CodeMirror.

Also the cursor does not appear.

The CodeMirror instance is being displayed inside a BootStrap modal on an Angular 1 SPA.

@marvindanig
Copy link
Author

It appears that Space will scroll the window, so it is as if the space input it not being captured by CodeMirror.

True that. It is my guess but with {passive: false} passed as options inside addEventListener on the iPad, it might just work.

@adrianheine
Copy link
Contributor

This is one of many issues which are difficult to debug and solve with the fundamental approach currently taken by CodeMirror.

We are working on a rewrite (CodeMirror 6) that will overhaul input handling and should address this issue, and we are currently raising money for this work: See the announcement for more information about the rewrite and a demo.

Note that CodeMirror 6 is by no means stable or usable in production, yet. It is highly unlikely that we pick up this issue for CodeMirror 5, though.

@kimyLee
Copy link

kimyLee commented Nov 6, 2018

I also meet this problem, it seems caused by the "contenteditable", try to add the following css style
textarea,
[contenteditable] {
-webkit-user-select: text;
user-select: text;
}
I just make it work by doing this

@marvindanig
Copy link
Author

This is it! @kimyLee you found the mojo for this one, great job! :+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants