Fix press Enter clearing text on Google search (#4718)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -152,6 +152,11 @@ class Action(BaseModel):
|
||||
# flag indicating whether the action requires mini-agent mode
|
||||
has_mini_agent: bool | None = None
|
||||
|
||||
# When True, the auto-completion Tab hack is skipped because a follow-up
|
||||
# action in the same batch targets the same element or presses a key (e.g. Enter).
|
||||
# Pressing Tab would move focus away and break that next action.
|
||||
skip_auto_complete_tab: bool = False
|
||||
|
||||
created_at: datetime | None = None
|
||||
modified_at: datetime | None = None
|
||||
created_by: str | None = None
|
||||
|
||||
@@ -1512,7 +1512,12 @@ async def handle_input_text_action(
|
||||
raise e
|
||||
finally:
|
||||
# HACK: force to finish missing auto completion input
|
||||
if auto_complete_hacky_flag and await skyvern_element.is_visible() and not await skyvern_element.is_raw_input():
|
||||
if (
|
||||
auto_complete_hacky_flag
|
||||
and await skyvern_element.is_visible()
|
||||
and not await skyvern_element.is_raw_input()
|
||||
and not action.skip_auto_complete_tab
|
||||
):
|
||||
LOG.debug(
|
||||
"Trigger input-selection hack, pressing Tab to choose one",
|
||||
action=action,
|
||||
|
||||
Reference in New Issue
Block a user