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

inputMode attribute is set as inputmode #1487

Closed
cluk3 opened this issue Jul 19, 2024 · 2 comments · Fixed by #1519
Closed

inputMode attribute is set as inputmode #1487

cluk3 opened this issue Jul 19, 2024 · 2 comments · Fixed by #1519
Assignees
Labels
bug Something isn't working

Comments

@cluk3
Copy link

cluk3 commented Jul 19, 2024

I'm testing wether an element has inputMode set to none given a specific condition. When I run expect(input.inputMode).toBe('none'); the test fail cause inputMode is undefined but it does not fail if I write expect(input!.inputmode).toBe('none'); (notice inputmode all lower case).
This doesn't happen with jsdom ( expect(input.inputMode).toBe('none') doesn't fail ).
Notice that also typescript is complaining when writing inputmode cause he is expecting the property to be called inputMode.

To Reproduce

  1. set inputMode="none" to an input element
  2. run expect(input.inputMode).toBe('none');

Expected behavior
The test should not fail as inputMode should be set to "none"

Device:

  • OS: MacOs Monterey
@cluk3 cluk3 added the bug Something isn't working label Jul 19, 2024
@cluk3
Copy link
Author

cluk3 commented Jul 19, 2024

I believe the issue is within this file. It should be correct to replace inputmode with inputMode as typescript, chrome and jsdom expect the latter naming.

@capricorn86 capricorn86 self-assigned this Aug 29, 2024
capricorn86 added a commit that referenced this issue Aug 29, 2024
capricorn86 added a commit that referenced this issue Aug 29, 2024
…MLInputElement and HTMLTextAreaElement (#1519)

* fix: [#1487] Changes wrong property name inputmode to inputMode in HTMLInputElement and HTMLTextAreaElement

* chore: [#1487] Attempt to fix unit tests
@capricorn86
Copy link
Owner

Thank you for reporting @cluk3! 🙂

It has been fixed now.

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