Popup code editor moves cursor while typing

I try very hard not to use the popup code editor for this single reason... which I'll tell you after this ad ;). Ok, but seriously every single time I try and use that popup editor it will randomly move my cursor to position 0 while I type. it's not a big deal for small code blocks but it does get annoying when every now and then you find yourself typing at the beginning of the text area so you have to delete it, move the cursor and continue on. sometimes I only get 2 more letters in before it moves the cursor again.

just thought I'd link to another topic where this problem has been mentioned recently

1 Like

I have the same issue. I expect it to happen but it is quite annoying.

Same issues but with component style fields or event handler fields, i cant type fast because cursor restores to position 0, so i need to open the popup code, but happens almost randomly

+1 to this, I find many/most of the helpers and code completion functions are too aggressive and there should be an option to slow them down or switch them off or have them appear on-demand


It's killing me too. I'm too scared to type at normal speed because the cursor randomly jumps to the start of the code.

Could we please have this fixed. @victoria @Tess

Hi @bobthebear,

is there an alternative to using the popup code editor?



This is hugely annoying and agree with others, "Needs to be fixed please".

Hi @stewart.anstey, there is an alternative, an extension for VSCode, it's in Public Beta so you have to enable it first: go to your Retool settings => Beta => VS Code Editing

Next, install the VSCode extension either in the IDE or through the marketplace

GitHub - tryretool/vscode-extension

From Retool
after that when you're editing an app you can open the Code panel and you'll see a little VSCode symbol you can click
Screenshot 2023-12-12 141417
This will open VSCode with at least one folder named 'queries'. If you've created other folders to organize your queries they'll show up also.

From VSCode
after you've installed the Retool extension in VSCode you can open the Command Palette (ctrl + shift + p) and type "Retool: Signin" or "Retool: Open App".

The Downside
only queries can be edited this way. any code blocks (from workflows or components) or text input where you can enter code still have to deal with the randomly moving cursor. It's a step in the right direction though if they aren't just going to fix the cursor problem

1 Like

I've marked this as a Solution only because it is a work around for the small but mightly annoying and apparently vastly known bug of the ghost cursor that demands you type at position 0. HOWEVER I would like to stress that this IS NOT a solution, but a SOMEWHAT of a workaround/loophole. Please don't sue me lol

Brilliant information, thanks for going to all the effort to document that. VSCode is our friend.

Sadly the query editor work perfectly on my end but none of the inline script editing works. Eg event handlers.

I will test it out this weekend. Many thanks!

Took this issue back to the team. Thank you for bringing awareness to this.

Happening to me too, and it's happening a lot - as in, every 10 or 15 seconds. I can't even type a single line without it jumping to position zero several times.
It started happening a few months back, but now has suddenly crossed over in to unusable territory. Slowing me down terribly, and it's very frustrating.
Happy to help debug. The app is relatively large, maybe it's got something to do with that and code completion?

Though tagging the workaround as a solution has caused this to be flagged as a 'solved' topic, which it really is not.

Same issue over here.. cursor keeps on jumping.

Hello everyone,

I am an engineer at Retool. Thanks to everyone for bringing this issue up; we're going to try and fix it as soon as possible.

If you'd like, feel free to send your app JSONs where this issue is occurring to francis@retool.com (using the Export to JSON option). This will help us diagnose the issue, and ultimately push out a fix more quickly!

Let me know if you have any other questions.

you're right it is a bit confusing, i removed the solution checkmark.

sent, the email included the question heh but ya I guess it'd be a question anyone might wonder: The files sent, they could contain PID, other information that probably shouldn't be public, or just private code. So, any files sent would be deleted after they no longer have a use and the file and it's contents would stay private for the team team/person using it right?

Do you still need an example app? I can send you ours.

Something I've noticed: It's as if it's resetting to a prior state. I've observed that when the cursor jumps to position 0, sometimes the last few characters I typed also disappear.

Correct, we will delete files are we no longer need them and files will only be shared with the relevant team.

Yes, it would be great if you could send us an example app this occurs on (and maybe even a screen recording of this occurring).

I see this happening all the time only in code pop outs. I also think it is related to the code helper popup. I think I only see it jump while that popup is being really forceful. What I mean is, sometimes while typing, you will have the popup appear conveniently when you pause or something. Other times it seems the popup is almost getting angry at you and it just keeps hammering into your face with every key stroke. I will start clicking the cursor into different spots to make it go away but the popup just keeps trying to drive new information infront of what I'm doing. I find the cursor will start jumping to 0 during these times the popup is sort of freaking out.