Skip to content

Conversation

mehtakhil
Copy link
Contributor

@mehtakhil mehtakhil commented Jun 26, 2025

why

Previously, the injected Stagehand cursor used position: absolute, which caused it to become misaligned when the page was scrolled. Using position: fixed ensures the cursor stays anchored to the viewport and always follows the pointer, regardless of scrolling. This directly affects CUA agent execution, where accurate cursor position provides visual grounding and prevents the agent from clicking multiple times due to cursor misalignment.

what changed

Changed the injected cursor’s CSS from
cursor.style.position = 'absolute' to cursor.style.position = 'fixed'; in domScripts.js.

test plan

  • Verified on a scrollable page that the injected Stagehand cursor remains correctly positioned and follows the pointer during scrolling.

@miguelg719 miguelg719 changed the base branch from main to miguel/contrib-121 June 27, 2025 04:57
@miguelg719 miguelg719 merged commit cca5be3 into browserbase:miguel/contrib-121 Jun 27, 2025
17 of 19 checks passed
miguelg719 added a commit that referenced this pull request Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants