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

Mobile browser error: Cannot read property 'setOption' of undefined #32

Closed
cephirothdy2j opened this issue Nov 5, 2017 · 4 comments
Closed

Comments

@cephirothdy2j
Copy link

We're getting an error thrown in Chrome for Android 7 and MS Edge Mobile:

TypeError: Cannot read property 'setOption' of undefined

Looks like it's being thrown here.

Per Codemirror's browser support page, mobile browser support is experimental. We can catch the mobile browsers in our application and render a textarea instead, but I thought maybe this error was introduced by recent changes made to your library since we never saw the issue prior to our release a couple days ago.

Thanks!

@scniro
Copy link
Owner

scniro commented Nov 5, 2017

Hey again thanks for opening this up. I previously blocked all rendering on mobile but was then suggested to support it as seen in 28. It should now render on mobile, but I am curious if the error is specific to only those two browsers (or possibly others) as I can see it on my iphone okay, also some basic emulating in my browser, and if so, would you have any clue as to why?

@cephirothdy2j
Copy link
Author

Thanks. I'm able to replicate on my iPhone 7 with iOS 11 (the error appeared in our tracker as I viewed the page); I can also replicate in BrowserStack on a Galaxy S8 in Chrome. See attached; the first screenshot is from the desktop version where the codemirror component is mounting correctly; the next two are from my iPhone and from BrowserStack, respectively. The input simply fails to render and the error throws.

screen shot 2017-11-05 at 5 40 16 pm

img_7226

screen shot 2017-11-05 at 6 04 22 pm

@cephirothdy2j
Copy link
Author

Sorry, this is on me; I just upgraded to 3.0.7 and the issue is resolved. Thanks for bearing with me!

@scniro
Copy link
Owner

scniro commented Nov 6, 2017

No worries! I'm glad this was easy for you to get back up and running 😄

@scniro scniro closed this as completed Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants