Cursor’s IDE browser will happily auto-accept window.confirm() and delete for example or worse whatever you clicked on without confirmation. If it can’t be made to pop up a dialog it at least should be auto-dismiss as I almost deleted hours of work.
Steps to Reproduce
Build an interface which has buttons with confirmations.
Expected Behavior
Pop up a confirmation dialog or at least auto-dismiss it.
Hey, thanks for the report, and I’m glad your work ended up being saved. That’s a really bad scenario.
What you’re describing is that the built-in browser tool is currently handling JS dialogs (window.confirm()) programmatically, without waiting for your confirmation. So a click on a button that triggers a confirm can go straight through.
I want to pass this to the team as a safety concern, but first I’ve got a couple questions so we can reproduce it more accurately:
Can you share the Request ID from the session where the browser auto-accepted the dialog? chat menu in the top right > Copy Request ID
Was the dialog always auto-accepted like pressing OK, or did it sometimes auto-decline like Cancel?
For now as a workaround, if you disable auto-run for browser actions, it will ask before interacting with the page. That gives you a chance to stop a destructive click before it happens. On unfamiliar or sensitive UIs, it’s best not to let the browser click in auto mode.
Basically I asked the agent to create a delete button. It did it and it opened the paged to test it and it was all fine (the agent as far as I understand has the ability to accept/dismiss). Then I decided to test it myself in the Cursor’s web browser window. The moment I clicked “delete” (luckily on something I had to delete anyway) it just went through and the item got deleted without the pop up modal. I’m lucky I decided to test with something that had to be deleted anyway. But someone else might not be that lucky.
In any case there is no real Request ID. The agent worked fine. The interaction with the opened page in Curosr’s web element is the dangerous part.
Thanks for clarifying. It’s clearer now. So the issue isn’t with the agent’s actions, it’s that when you manually click the button in the built-in browser, calling window.confirm() doesn’t show a dialog and it continues as if you pressed OK. In that case, we don’t need a Request ID since the agent session ran normally.
I’m passing this to the team as a safety concern since we can’t rely on the details of confirm() right now.
One important note about the workaround. Disabling auto-run for browser actions only affects agent clicks, it doesn’t affect manual clicks. So for now, to verify destructive flows like delete, it’s better to test the page in an external system browser instead of Cursor’s built-in browser window since native dialogs like window.confirm() aren’t popping up there right now.