Skip to content

Fix a bug where input event may not be fired#1099

Merged
rbri merged 1 commit intoHtmlUnit:masterfrom
duonglaiquang:duong_input
Mar 13, 2026
Merged

Fix a bug where input event may not be fired#1099
rbri merged 1 commit intoHtmlUnit:masterfrom
duonglaiquang:duong_input

Conversation

@duonglaiquang
Copy link
Contributor

This PR does the following

Fix HtmlElement to correctly fire the input event when typing into <input> elements with type=email, type=url, type=date, or type=time.

Problem

When calling HtmlElement.type() on input elements with type=email, type=url, type=date, or type=time, the input event is never fired.

The code that dispatches the event uses an explicit list of instanceof checks (HtmlTextInput, HtmlTelInput, HtmlNumberInput, HtmlSearchInput, HtmlPasswordInput) that does not include all text-like input types.

@sonarqubecloud
Copy link

@rbri
Copy link
Member

rbri commented Mar 13, 2026

🤦 I'm always suprised what kind of errors we have; thanks a lot for pointing at this

@rbri rbri merged commit b04cabb into HtmlUnit:master Mar 13, 2026
8 checks passed
@rbri
Copy link
Member

rbri commented Mar 13, 2026

have migrated your test to webdriver and as you can see, the real story will be longer. But this is already a great step forward. Thanks a lot.

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