Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions browser_utils/page_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,8 @@ async def submit_prompt(
check_client_disconnected, "After Input Visible"
)

# Fill textarea using centralized logic (inherited from InputController if possible, or direct)
await textarea.evaluate(
"(el, t) => { el.value = t; el.dispatchEvent(new Event('input', {bubbles:true})); el.dispatchEvent(new Event('change', {bubbles:true})); }",
prompt,
)
# Use Playwright-native fill so Angular/React/Vue input handlers receive proper events.
await textarea.fill(prompt)
await self._check_disconnect(
check_client_disconnected, "After Input Fill"
)
Expand Down
2 changes: 2 additions & 0 deletions config/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# Submit button: prioritize primary submit button in prompt area
SUBMIT_BUTTON_SELECTOR = (
# Current UI structure
"button.ctrl-enter-submits, "
'ms-run-button button[type="submit"].ms-button-primary, '
'ms-run-button button[type="submit"], '
# Legacy selectors
Expand Down Expand Up @@ -296,3 +297,4 @@
'mat-dialog-container button:has-text("Cancel"), '
'mat-mdc-dialog-container button:has-text("Cancel")'
)