[GH-ISSUE #5377] [bug]: Editing a Post-Request Script #2059

Open
opened 2026-03-16 23:01:44 +03:00 by kerem · 11 comments
Owner

Originally created by @djneely on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5377

Originally assigned to: @jamesgeorge007, @CuriousCorrelation on GitHub.

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Platform

Desktop App

Browser

Other (specify in additional info)

Operating System

macOS

Bug Description

When editing a Post-request script and I already have some code above the line I am working on, the editor starts acting very strange. After every character (or every other) you type, it auto-adds a space after each character you type. This makes it very difficult to edit your scripts. In order for the editor to 'act correctly' you have to remove all the lines below the line you are working on.

Image

Deployment Type

Self-hosted (on-prem deployment)

Version

No response

Originally created by @djneely on GitHub (Sep 5, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5377 Originally assigned to: @jamesgeorge007, @CuriousCorrelation on GitHub. ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Platform Desktop App ### Browser Other (specify in additional info) ### Operating System macOS ### Bug Description When editing a Post-request script and I already have some code above the line I am working on, the editor starts acting very strange. After every character (or every other) you type, it auto-adds a space after each character you type. This makes it very difficult to edit your scripts. In order for the editor to 'act correctly' you have to remove all the lines below the line you are working on. <img width="921" height="227" alt="Image" src="https://github.com/user-attachments/assets/f2bad719-d8ff-4040-a0c5-81f7a82867b5" /> ### Deployment Type Self-hosted (on-prem deployment) ### Version _No response_
Author
Owner

@liyasthomas commented on GitHub (Sep 5, 2025):

@jamesgeorge007 can you look into this?

<!-- gh-comment-id:3258604421 --> @liyasthomas commented on GitHub (Sep 5, 2025): @jamesgeorge007 can you look into this?
Author
Owner

@jamesgeorge007 commented on GitHub (Sep 7, 2025):

This appears specific to the Desktop App. @CuriousCorrelation, please take a look.

<!-- gh-comment-id:3263931358 --> @jamesgeorge007 commented on GitHub (Sep 7, 2025): This appears specific to the Desktop App. @CuriousCorrelation, please take a look.
Author
Owner

@arrayxx commented on GitHub (Sep 24, 2025):

Not only the desktop app but the web version too

Image
<!-- gh-comment-id:3326628386 --> @arrayxx commented on GitHub (Sep 24, 2025): Not only the desktop app but the web version too <img width="540" height="493" alt="Image" src="https://github.com/user-attachments/assets/a83c4647-53b3-41b5-93ce-18533659d7a6" />
Author
Owner

@jamesgeorge007 commented on GitHub (Sep 24, 2025):

Could you mention the browser in which this is reproducible? For instance, this issue is reproducible in Safari, and as a result, it's also observable in the Mac OS Desktop App, since it uses Safari's webview renderer. In the meantime, you can opt out of the experimental scripting sandbox via Settings > Experiments, falling back to the scripting editors based on CodeMirror instead of Monaco.

<!-- gh-comment-id:3326691922 --> @jamesgeorge007 commented on GitHub (Sep 24, 2025): Could you mention the browser in which this is reproducible? For instance, this issue is reproducible in Safari, and as a result, it's also observable in the Mac OS Desktop App, since it uses Safari's webview renderer. In the meantime, you can opt out of the experimental scripting sandbox via Settings > Experiments, falling back to the scripting editors based on [CodeMirror](https://codemirror.net/) instead of [Monaco](https://github.com/microsoft/monaco-editor).
Author
Owner

@djneely commented on GitHub (Sep 25, 2025):

Do you want a video of the desktop issue? You mention that you're able to reproduce so I'm assuming no, but happy to do so.

<!-- gh-comment-id:3333800996 --> @djneely commented on GitHub (Sep 25, 2025): Do you want a video of the desktop issue? You mention that you're able to reproduce so I'm assuming no, but happy to do so.
Author
Owner

@thisisaman408 commented on GitHub (Oct 9, 2025):

is someone working on it? If not!, can I work on this issue?

<!-- gh-comment-id:3387637852 --> @thisisaman408 commented on GitHub (Oct 9, 2025): is someone working on it? If not!, can I work on this issue?
Author
Owner

@djneely commented on GitHub (Nov 12, 2025):

Could you mention the browser in which this is reproducible? For instance, this issue is reproducible in Safari, and as a result, it's also observable in the Mac OS Desktop App, since it uses Safari's webview renderer. In the meantime, you can opt out of the experimental scripting sandbox via Settings > Experiments, falling back to the scripting editors based on CodeMirror instead of Monaco.

I did as this mentioned (turning off the 'Experimental Scripting Sandbox' and the issue is no longer on the Mac desktop app.

<!-- gh-comment-id:3521644187 --> @djneely commented on GitHub (Nov 12, 2025): > Could you mention the browser in which this is reproducible? For instance, this issue is reproducible in Safari, and as a result, it's also observable in the Mac OS Desktop App, since it uses Safari's webview renderer. In the meantime, you can opt out of the experimental scripting sandbox via Settings > Experiments, falling back to the scripting editors based on [CodeMirror](https://codemirror.net/) instead of [Monaco](https://github.com/microsoft/monaco-editor). I did as this mentioned (turning off the 'Experimental Scripting Sandbox' and the issue is no longer on the Mac desktop app.
Author
Owner

@AaronFortG commented on GitHub (Dec 11, 2025):

Could you mention the browser in which this is reproducible? For instance, this issue is reproducible in Safari, and as a result, it's also observable in the Mac OS Desktop App, since it uses Safari's webview renderer. In the meantime, you can opt out of the experimental scripting sandbox via Settings > Experiments, falling back to the scripting editors based on CodeMirror instead of Monaco.

This happened to me as well on Google Chrome on a MacOS using the Web App ^^

<!-- gh-comment-id:3643926510 --> @AaronFortG commented on GitHub (Dec 11, 2025): > Could you mention the browser in which this is reproducible? For instance, this issue is reproducible in Safari, and as a result, it's also observable in the Mac OS Desktop App, since it uses Safari's webview renderer. In the meantime, you can opt out of the experimental scripting sandbox via Settings > Experiments, falling back to the scripting editors based on [CodeMirror](https://codemirror.net/) instead of [Monaco](https://github.com/microsoft/monaco-editor). This happened to me as well on Google Chrome on a MacOS using the Web App ^^
Author
Owner

@zhaoqiang1024 commented on GitHub (Feb 10, 2026):

The script is no longer executable after exiting the experimental script sandbox.

<!-- gh-comment-id:3875026330 --> @zhaoqiang1024 commented on GitHub (Feb 10, 2026): The script is no longer executable after exiting the experimental script sandbox.
Author
Owner

@jamesgeorge007 commented on GitHub (Feb 12, 2026):

The script is no longer executable after exiting the experimental script sandbox.

Could you mention the snippet used alongside the steps to reproduce/ the behaviour observed in this scenario?

<!-- gh-comment-id:3889716661 --> @jamesgeorge007 commented on GitHub (Feb 12, 2026): > The script is no longer executable after exiting the experimental script sandbox. Could you mention the snippet used alongside the steps to reproduce/ the behaviour observed in this scenario?
Author
Owner

@abrouaux commented on GitHub (Feb 12, 2026):

Could you mention the snippet used alongside the steps to reproduce/ the behaviour observed in this scenario?

Any use of the new hopp global variable instead of pw - basically anything new to the experimental box. I'm guessing the use of crypto too, etc.

// Set timestamp variable
const timestamp = Date.now();
hopp.env.active.set("timestamp", timestamp.toString());

for example.

<!-- gh-comment-id:3893439985 --> @abrouaux commented on GitHub (Feb 12, 2026): > Could you mention the snippet used alongside the steps to reproduce/ the behaviour observed in this scenario? Any use of the new hopp global variable instead of pw - basically anything new to the experimental box. I'm guessing the use of crypto too, etc. ``` // Set timestamp variable const timestamp = Date.now(); hopp.env.active.set("timestamp", timestamp.toString()); ```` for example.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2059
No description provided.