-
Notifications
You must be signed in to change notification settings - Fork 193
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
not rendering on mobile #28
Comments
Hello, If you peek at #22, I implemented this for server-side rendering support. I borrowed the implementation from the sample implementation available in react-code-mirror. I don't specifically see why mobile should be excluded as well but figured this was already solved, hence why it's implementation this way. I'm not opposed to supporting mobile devices but would like to learn more about the use case. Do you have a need to use codemirror on mobile? I'd imagine it wouldn't be very effective to have syntax editing on mobile - but - I suppose the case could be made for it. Thoughts? |
Hi @scniro Currently, there is no option to use react-codemirror2 without SSR setup. The main use case is to support mobile browsers, just like the original codemirror does. I know it's experimental, but it works pretty well. |
@xidedix hey again. Sure I can take the check out for mobile but leave the |
Hey @scniro I'm using this project for https://react-reboot.now.sh/ An user reported an error on Android mobile and it's due to this check: I don't think my tool should be very usable on mobile as coding on a mobile device is not good DX, but at least I'd like to offer mobile visitors a preview of the purpose of the tool that does not show "unexpected error" :D |
I use the controlled input on mobile, and do update the props from parent, triggering Not sure exactly to understand the purpose on IS_MOBILE but you probably want to add this to the this.hydrate() to be consistent |
For those interested I published |
@slorber This is going to be fixed today. Clearly the issue is fresh and I even make mention that I'll be working through this. To publish a new project only a few hours after your first comment on an active thread is jumping the gun a bit, don't you think? I'd strongly suggest un-publishing that and have a small amount of patience. |
@scniro I'm not forking your project to maintain it, I'm just publishing a static version that I can use as a dependency right now, but for sure I'll use your version once you make it work on mobile I often do that when I want the fix to work right now and it takes me 5min so not a big deal, now you can take your time to fix it properly ;) |
@slorber Ahh gotcha, I do similar but Ill usually Anyways, this should be fixed in the 3.0.6 release. Please check it out and let me know if all looks good? If so I'll go ahead and close this out 👍 |
thanks it works fine for me |
LGTM, thank you Sal! |
It seems like codemirror is intentionally blocked on mobiles.
Why is that?
The text was updated successfully, but these errors were encountered: