freeCodeCamp / freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.
https://contribute.freecodecamp.org
BSD 3-Clause "New" or "Revised" License
405.27k stars 38.02k forks source link

[BETA] Cursor placement bug in the React & Redux challenges #17053

Closed vipatron closed 6 years ago

vipatron commented 6 years ago

Challenge Name

https://beta.freecodecamp.org/en/challenges/react-and-redux/use-provider-to-connect-redux-to-react (And others - I kind of just accepted it as a weird quirk, and navigated to the correct position using keys because I wanted to focus on writing the code in my working memory)

Issue Description

When I first click into the Editor in many (perhaps all) of the React, Redux, and React-Redux challenges, the cursor places where I intend, blinking in the intended location. However, when I begin to type, the cursor jumps and the first-typed letter is in a random location (not where the cursor had previously been blinking.) Apparently, there are a few closed threads on this issue.

How to reproduce the bug: I have been experimenting to find out the conditions under which this occurs. As far as I can tell, the issue occurs when the Editor field first gets the focus after one of the panes has been toggled (on or off). I often toggle the map off, and sometimes the preview pane to increase screen real estate. During the course of these investigations, I have noticed that sometimes the initial cursor placement is buggy, too, blinking on a line I didn't click. Either way, the first-typed character appears on yet another line in a different location.

Browser Information

Screenshot (animated)

beta-cursor-placement-bug

raisedadead commented 6 years ago

We are considering moving away to monaco editor to get this resolved.

QuincyLarson commented 6 years ago

We moved to Monaco so this is no longer an issue.