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

type regression when used with setRangeText #981

Closed
dzonatan opened this issue Jul 12, 2022 · 5 comments · Fixed by #984
Closed

type regression when used with setRangeText #981

dzonatan opened this issue Jul 12, 2022 · 5 comments · Fixed by #984
Labels
bug Something isn't working released

Comments

@dzonatan
Copy link

dzonatan commented Jul 12, 2022

Reproduction example

https://codesandbox.io/s/repro-userevent-setrangetext-v14-efm7wv

Prerequisites

Type 12,34 in the input field.

Expected behavior

A comma (,) gets automatically replaced with the dot (.) both in the browser and tests.
i.e. the final input value is expected to be 12.34.

Actual behavior

final value in the browser: 12.34
final value in the tests: 1234

User-event version

14.2.1

Environment

No response

Additional context

This was working in v13: https://codesandbox.io/s/repro-userevent-setrangetext-v13-0wl91f?file=/src/App.test.js

@dzonatan dzonatan added bug Something isn't working needs assessment This needs to be looked at by a team member labels Jul 12, 2022
@ph-fritsche ph-fritsche removed the needs assessment This needs to be looked at by a team member label Jul 12, 2022
@ph-fritsche
Copy link
Member

Thanks for the report ❤️

@ph-fritsche
Copy link
Member

In case anyone stumbles over this later:
Note that Jsdom doesn't implement the fourth property selectMode properly for 'end' and 'select'. See jsdom/jsdom#2601

@ph-fritsche
Copy link
Member

@all-contributors add @dzonatan bug

@allcontributors
Copy link
Contributor

@ph-fritsche

I've put up a pull request to add @dzonatan! 🎉

@github-actions
Copy link

🎉 This issue has been resolved in version 14.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants