Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
browser_type tool does not trigger React state updates in controlled components
Summary
When using the Cursor Agent’s browser_type tool (specifically in the Inside-Browser), text is successfully inserted into the DOM of an or . However, React applications using controlled components (where the value is managed via useState and onChange) do not detect the input. Consequently, UI logic dependent on that state (such as “Send” buttons being enabled) remains unchanged until a manual keyboard entry is made.
Environment
OS: macOS (Darwin 25.0.0)
Browser: Cursor Integrated (Inside-Browser)
Framework: React 18 (using controlled components)
Observed Behavior
The Agent uses browser_type to fill a text field.
The text is visible in the UI inside the browser.
The React state associated with that field remains empty/undefined.
Any button with logic like disabled={!text.length} remains disabled.
If a user manually clicks into the field and types a single character, React suddenly “wakes up,” detects the entire string, and updates the state.
Root Cause Hypothesis
The browser_type tool appears to be setting the value property of the HTML element directly but might not be dispatching the necessary Synthetic Events (input, change, or keydown) that React’s event delegation system listens for. In React, simply changing element.value = “text” does not trigger the onChange handler.
Steps to Reproduce
Steps to Reproduce
Create a simple React component with a controlled input:
const [val, setVal] = useState(“”); return ( <> <textarea value={val} onChange={(e) => setVal(e.target.value)} /> <button disabled={val.length === 0}>Submit </> );
Open this page in the Cursor Inside-Browser.
Ask the Cursor Agent to “type ‘Hello World’ into the textarea and click Submit.”
Result: The Agent types the text, but the Submit button remains disabled. The Agent fails to click the button because the app doesn’t think there is any text.
Expected Behavior
The browser_type tool should simulate input in a way that triggers standard browser events (input and change) so that framework-level state managers (React, Vue, etc.) can react to the change.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.3.21 (Universal)
VSCode Version: 1.105.1
Commit: 68e0a0385b87408d050869ea543e3778ad53f780
Date: 2026-01-02T23:46:13.381Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.0.0
For AI issues: which model did you use?
Any tested model like Auto and Gemini 3 Flash
Does this stop you from using Cursor
No - Cursor works, but with this issue