The worker code editor is broken, it executes the worker script on every key press

For Workes & Pages, what is the name of the domain?

dev domain

What is the issue or error you’re encountering

The worker code editor is broken, it executes the worker script on every key press in the file editor, as well as on every key press in the HTTP.POST.body panel. If I want to POST a payload with the string “test”, it will execute 4 posts, first with “t”, then “te”, then “tes”, then “test” - as every key press executes the submit. I have tried deleting all cookies etc in my browser. What is wrong?

What steps have you taken to resolve the issue?

I have tried deleting all cookies in my browser. Logged in, Logged out. Restarted computer.

What are the steps to reproduce the issue?

Open any worker. Click “Edit code”. Put cursor in file editor. Press any key on keyboard, for example space key. The worker is now executed using the preview window. If I want to write “console.log(“hello”);” then the script runs 20 times, first on “c” ← syntax error, “co” <–syntax error, “con” ← syntax error etc etc.
Here is a video example: Cloudflare | Web Performance & Security - Google Chrome - 24 August 2024 | Loom
Note that the worker is executed as I write.

Hello @user9565,

The behavior that you are describing is a designed feature to improve feedback:

When editing a worker in the dashboard, Cloudflare spins up a preview of your worker, deployed from the code you’re currently working on. This helps speed up the feedback loop when developing a worker, and makes it easy to test changes without impacting production traffic (see also, wrangler dev).

You can see more details in our Blog Post: A whole new Quick Edit in Cloudflare Workers.

The Workers Team are more active on their Discord server, so if you have more questions, I would recommend asking on Discord if you haven’t already.

Please do feel free to update the thread here if you get a resolution, to help others who may find this topic

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.