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

Wrong mapping of change and input events for HTMLInputElement #1484

Open
3 of 12 tasks
bastiW opened this issue Jun 25, 2024 · 4 comments · May be fixed by #1552
Open
3 of 12 tasks

Wrong mapping of change and input events for HTMLInputElement #1484

bastiW opened this issue Jun 25, 2024 · 4 comments · May be fixed by #1552
Labels
bug Something isn't working

Comments

@bastiW
Copy link

bastiW commented Jun 25, 2024

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Preact
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

https://mitosis.builder.io/playground/?outputTab=G4VwpkA%3D&code=JYWwDg9gTgLgBAbzgVwM4FMDKMCGN1wC%2BcAZlBCHAEQACARssADYAm6UAdMBAPQjAwIqYKioBuAFAT0AD0iw4bEjmRN4JZADsAxjG6a4AWQCeAYQqRN6TTAAUYcmFQBKRBLhxtETangBtTRwQdAAaOAwYADkg9ABdOABeFAxsPHRbKmx0ADd0KmdJdzgodBhkKANbIo8AHhZgbIA%2Bao84GuBNMGQYFtbPVFQEhARevs8IJmgALmoSlioQ0Y9CQiW4bJwmZHQhwODVsdbvAElO7qHbHOsYVwTG8NLo4Mvcmw5cKABzUo4NrfRnAdDnBvKYABY4TTfC5XGy3e4RJ7pWEwd44L4%2FP7bQGjHjNQ4ACXQTEmAEI4MdPJDilo4B04AAldA4XRhABq2zCmAmwBYYWgcAAMsAAI6MFiklo1Hj1JpFAoSQhAA

Expected Behaviour

When both onInput and onChange events are present on HTMLInputElement, they should be both properly mapped to the correct change event

Actual Behaviour

is always compiled to the input event.

Additional Information

Follow up of #1263

  • On solid I am not sure if they have a change event
  • Web components & HTML not tested because they have no playground
@bastiW bastiW added the bug Something isn't working label Jun 25, 2024
@JerryWu1234
Copy link
Contributor

I'll check this problem

@JerryWu1234
Copy link
Contributor

image

@bastiW Could you tell me more about this? I‘n not totally understand

@bastiW
Copy link
Author

bastiW commented Aug 26, 2024

The mapping from onChange to (change) does not happen with angular, stencil and svelte.

Currently: onChange maps to (input)
Should: onChange maps to (change)

image

@nmerget
Copy link
Contributor

nmerget commented Sep 6, 2024

@bastiW

Are you sure that svelte has the same issue?

I don't have any experiance with svelete but I think onChange will be a special case.

Web components and lit are affected as well.

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
Development

Successfully merging a pull request may close this issue.

3 participants