Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

userEvent.type not entering spaces into inputs with type password #792

Closed
rreevesforage opened this issue Nov 24, 2021 · 1 comment
Closed

Comments

@rreevesforage
Copy link

rreevesforage commented Nov 24, 2021

Based on this issue, there appears to be a sanitation algorithm that may be removing (not entering) space characters into password fields. There is a work-around using fireEvent.change() to get my test to pass instead

Hi, I think that the same problem is present when the input control is of type url: https://github.com/jsdom/jsdom/blob/5279cfda5fe4d52f04b2eb6a801c98d81f9b55da/lib/jsdom/living/helpers/form-controls.js#L266
Originally posted by @BentMylund in #479 (comment)

@ph-fritsche
Copy link
Member

password is not sanitized in jsdom:
https://github.com/jsdom/jsdom/blob/a61fdb886a30fce6a3aa68002e1af6e5bcb4c372/lib/jsdom/living/helpers/form-controls.js#L180-L186

Using fireEvent.change is not a workaround here. It's a Volkswagen.

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

No branches or pull requests

2 participants