# Bug when deleting code from the JS tab

**URL:** https://meta.discourse.org/t/bug-when-deleting-code-from-the-js-tab/374439
**Category:** Bug
**Tags:** needs-repro
**Created:** [July 16, 2025, 11:42am UTC](https://meta.discourse.org/t/bug-when-deleting-code-from-the-js-tab/374439 "2025-07-16T11:42:31Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)
#### Post date: [July 16, 2025, 11:42am UTC](https://meta.discourse.org/t/bug-when-deleting-code-from-the-js-tab/374439/1 "2025-07-16T11:42:31Z")

</div>

Workflow:

1. I have a script that I copied from somewhere else
2. Paste it into the JS tab on a custom component I created
3. Hit SAVE
4. Change the script somewhere else, copied
5. In the JS tab, I use CMD+A to select the whole script
6. Hit DELETE. It doesn’t delete it. It goes to the beginning of the script.

I have to select all again, hit DELETE for it to actually delete the script, so I can paste the new version.

I believe this is an issue with the full screen version. Here’s what’s happening: when I delete the script (in full screen), if I then click the button to make it smaller, the script comes back, even though I deleted it. There’s something going on there.

* * *

**EDIT:** it’s actually not related to the full screen. For example, I add a script, save it, place the cursor somewhere to delete a character, the cursor jumps to the top of the script (full screen or not)

---

_[View the full topic](https://meta.discourse.org/t/bug-when-deleting-code-from-the-js-tab/374439)._
