-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
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
When this page is first loaded, the code only shows up to line 11. #2707
Comments
I cannot replicate. Can you post screen shots of the issue? |
Can you try reseting your code? (your current code will be lost) |
yeah resetting the code will display the rest of the code but if I do a refresh of the page it will behave the same where only code upto line 11 will show. |
I experience this issue too! |
Thank you all for reporting. We no longer need anymore screen caps. We need to find out where the bug lies. Could someone who is experiencing this issue spin up a local copy and step through the code in It is difficult for us to actually fix something we cannot replicate. I suspect its could be one of two things, but it may also be something else entirely. a. It could be the codeStorage code in the begging of the commonFramework file (the code responsible for saving and pulling code out of localStorage). This would explain why |
The rest of the code appears after a repaint (resizing the viewport makes it appear), I guess it may be a CodeMirror problem |
It would be great if we could be certain. |
@BerkeleyTrue try this. |
I will tell you what I see, I hope it is helpful… I’m in commonframework, and when I step from line 757, to line 759, that’s when the code gets displayed up to line 11. Ok, so I started stepping INTO the functions that are being invoked between lines 757 and 759. Somewhere between lines 709 and 713, the code gets displayed up to line 11. I noticed that the variable toUpdate has value 11. |
@bugron and I looked into fixing this with wordwrap, but it didn't work. We think the issue is that our version of Codemirror is stale. We need to switch to using the NPM version of Codemirrror instead of vendorizing Codemirror in our app. @BerkeleyTrue I know you mentioned your desire to do this. I think this is a priority. |
Can someone test against a newer version CodeMirror and report their findings? |
@BerkeleyTrue I tried v5.6.1 and this is the result. |
Anyone have any insight on the root cause? |
I'm currently out, so I'll just post the links I've found. Related: |
^ didn't work for me on localhost. Added |
Interesting, this issue does not happen for me in the JavaScript waypoints. Just FYI in case it provides a clue. UPDATE: Scratch that! It just happened in JavaScript waypoint 37. Some of the earlier waypoints had more than 11 lines of code, though, and it worked fine in those. |
@BerkeleyTrue , @ahstro , @awesomeaniruddh try this. . Worked for me. The code: $(document).ready(function() {
editor.setOption("mode", "text/html");
editor.refresh();
}); |
Looks like we just need to add the editor.refresh() to the end of commonFramework. I remember this being somewhere in the code before but I may have been removed accidentally. Anyone want to submit a PR? |
I'm getting this issue after moving from an older, vendorized version of CM to using the packaged version off npm. Is there any known workaround? I'm getting issues with
|
As an addendum, it seems to only happen when i'm placing it within a div that's configured to have |
old topic, but still a problem, as I determined. My solution was to set lineWrapping to false when mode is text/html: before after that was all I had to change. |
Challenge http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine has an issue. Please describe how to reproduce it, and include links to screenshots if possible.
When this page is first loaded, it only shows code up to line 11. The rest of the code shows up when the blank space below line 11 is clicked, or when the code area is scrolled.
The text was updated successfully, but these errors were encountered: