• Welcome to Thousand Roads! You're welcome to view discussions or read our stories without registering, but you'll need an account to join in our events, interact with other members, or post one of your own fics. Why not become a member of our community? We'd love to have you!

    Join now!

How to Fix Backspace Bug in Editor

Mirage

Pokémon Trainer
Location
Honolulu, HI
Pronouns
He/him
Partners
  1. minccino
  2. espurr
Hi everyone! I'm not sure how much this affects anyone else, but I thought I'd mention it here in case it's helpful to you as well...

Sometimes, when I'm writing in the editor here on Thousand Roads and you press backspace or delete, it'll not only backspace the character, but also remove an empty line above. I run into this a lot when I use blank lines to separate paragraphs or comments, and it drives me nuts haha.

I looked around for a bit and noticed that someone shared a workaround for how to prevent the editor from doing that... to fix it, you'll first need to access your browser's developer console. For Firefox, Chrome, and I think Edge too, it's enabled by default - for Safari, you'll first need to enable it by going to the "Settings" menu, the "Advanced" tab, and then all the way at the bottom, checkmarking the "Show features for web developers" box.

Once it's enabled, you'll just need to right click on the page with the editor in TR, and then click "Inspect" or "Inspect Element". This should pop open a pane. It'll look a little different in each browser, but you're looking to click on a tab that says "Console", or has a little box with a " >_ " in it. You'll know you've reached the right place when it looks something akin to this:

Screenshot 2025-05-24 at 3.01.42 PM.png

Inside that console box, notice at the bottom left, you see the " >> " symbols? Paste these lines of code below next to it, then hit enter:

JavaScript:
window.addEventListener('keydown', function (e) { e.stopPropagation(); }, true);
window.addEventListener('keyup', function (e) { e.stopPropagation(); }, true);
window.addEventListener('keypress', function (e) { e.stopPropagation(); }, true);

You'll likely see the message "undefined" appear underneath after doing so - that's perfectly normal and not an error in this context.

Screenshot 2025-05-24 at 3.07.05 PM.png

And that's it! You can now close the console, and it shouldn't delete the newlines anymore when you backspace in the editor. However, since you manually injected the code into the page, it's only temporary - next time you reload or navigate away, you'll need to re-enter it. Also, there is a warning in that thread that it might break some other parts of the editor... I haven't noticed it happening yet, but just a heads up that if anything stops working, try reloading the page and then seeing if it's fixed without the code above.

Hope this helps!
 

Negrek

Three of Cups
Staff
Premium
Ah, thanks for posting about this! I'm glad you were able to find a workaround. It looks as though this issue is supposed to be fixed in the next version of the forum software, which I should hopefully have up and running in the next couple months.

Sorry this has been causing you so many problems!
 

Mirage

Pokémon Trainer
Location
Honolulu, HI
Pronouns
He/him
Partners
  1. minccino
  2. espurr
Oh no worries! It's not that bad - it's honestly a pretty small thing, just gets me every time since I use Shift+Enter for most other text boxes elsewhere haha.

A new version of the software huh :eyes: curious if there will be any visual changes, or if it'll mostly just be on the backend side?
 
Last edited:
Top Bottom