Skip to content

[atoms] Clear invalid input in the legacy atom - #18326

Open
juliopiubello wants to merge 3 commits into
SeleniumHQ:trunkfrom
juliopiubello:fix/legacy-clear-invalid-input
Open

juliopiubello wants to merge 3 commits into
SeleniumHQ:trunkfrom
juliopiubello:fix/legacy-clear-invalid-input

Conversation

@juliopiubello

@juliopiubello juliopiubello commented Nov 17, 2026 •

Copy link
Copy Markdown

Related Issues

Chromium issue 575945224 · ChromeDriver change 8612892

What does this PR do?

Fix the legacy Clear atom's handling of invalid input with an empty serialized value. Invalid month input is reset, and invalid number input goes through the existing change and unfocus path.

Implementation Notes

Check validity.badInput for input elements alongside value. Preserve the legacy atom's separate path for valid, empty number inputs. The newer TypeScript Clear implementation already handles badInput.

This follows the WebDriver clear-a-resettable-element algorithm: empty invalid input must continue to the clearing steps.

Add focused tests for invalid month and number inputs, plus a valid-empty number control for focus and events. The invalid-input fixtures use a controlled validity property because assigning a value in JavaScript cannot create native invalid editing state.

AI assistance

  • AI assisted
    • Tool(s): OpenAI Codex
    • What was generated: implementation, regression tests and PR description.
    • I reviewed all AI output and can explain the change

Types of changes

  • Bug fix (backwards compatible)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@CLAassistant

CLAassistant commented Nov 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@selenium-ci selenium-ci added the B-atoms JavaScript chunks generated by Google closure label Nov 17, 2026
@juliopiubello
juliopiubello force-pushed the fix/legacy-clear-invalid-input branch from c9ac937 to 3cff0c0 Compare November 17, 2026 07:20
@juliopiubello
juliopiubello marked this pull request as draft November 17, 2026 12:19
@juliopiubello
juliopiubello marked this pull request as ready for review November 24, 2026 23:53
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-atoms JavaScript chunks generated by Google closure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants