Freecodecamp: Weird cursor jumps

Created on 13 Mar 2016  路  17Comments  路  Source: freeCodeCamp/freeCodeCamp

Challenge Use Spans for Inline Elements has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

This issue has been going on for the last couple of challenges. The cursor jumps around when trying to start the challenge. I will click where I want to type. The cursor will be a few spaces back from where I clicked, so I try to type something. my input appears a line below where I clicked. Its not until I click, type something, and delete it that everything works as it should. Not a huge issue or anything, but distracting.

Most helpful comment

Please follow the codemirror issue here https://github.com/codemirror/CodeMirror/issues/1862

All 17 comments

+1

Happens to me too.

@TheCodeJones @Brayn7 @techtolentino @Will-Campbell

Thanks for confirming this. Unfortunately I have not been able to reproduce this. Could you help us with below information to get started in resolving this:

  1. Location : Where are you located (region) ?
  2. Can you have any GIF recordings/Screenshots anything that can help us understand this better.
  3. Can you check your console for any errors?

    • On your browser open the Dev Tools (Press F12) and go to the Console tab.

    • Refresh the page, and try to reproduce the error.

    • Post the screenshot of the console and network tabs.

Any other information that you could provide.

Sincere apologies for the inconvenience, and thanks for your patience and help in resolving this.

/cc @FreeCodeCamp/issue-moderators

This is a known issue with Code Mirror, the software we use to edit code for our challenges. This occurs when there are long lines of code and they wrap. There are supposed to be fixes in newer versions of Code Mirror.

Ref: https://github.com/codemirror/CodeMirror/issues/1862

@SaintPeter Thanks! So I guess we are blocked by this.

+1

+1

This manifested for me as seemingly not being able to click or move the cursor (even using arrow keys) to the last line of my code.

So will this be fixed here soon if it's related to that Code Mirror bug?

I switched from my Surface to PC (where font size/scaling is all default) and tried all my browsers trying to fix it until I saw this thread.

I narrowed it down to occurring when the pre-filled code in the code box is long enough that a scroll bar is added (to the code box). Because it starts happening to me from "Add Placeholder Text to a Text Field" where the scroll bar appears. Just having lines of code that wrap don't seem to cause it because lines wrapped in the lessons prior to this one.

When the scroll bar is there I can't click certain parts of the code (on this stage it's very evident because I can't click where I need to to add the required code). The cursor jumps to some weird place instead. Arrow keys can't even get me where I need to go as mentioned above.

The easiest way I've found to get around this bug is just to click somewhere it lets me and hit the spacebar so I've typed something... then I can correctly click anywhere in the code.

It's not a show stopper, easy to get around, but between this and #3204 I've lost a couple hours on bugs in this code editor and I'm not very far in. I'm a bit worried of what's to come.

edit - zooming out in the browser may even be a better temporary fix for now because I can click freely straight away even if the scroll bar is still there. Just might cause other bugs...

Please follow the codemirror issue here https://github.com/codemirror/CodeMirror/issues/1862

@Kahldris thank you for mentioning how you get around it. I didn't think to try anything like that.

+1

Tried @Kahldris suggestion of zooming in and out (ctrl + "+", ctrl + "0") as a temporary fix which allowed me to get past this.

@smartestprimate worked for me too, thanks!

+1

This issue is still a thing, apparently.

Was this page helpful?
0 / 5 - 0 ratings