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

event.preventDefault() has no effect on interactive components #5446

Open
md5login opened this issue Feb 3, 2024 · 0 comments
Open

event.preventDefault() has no effect on interactive components #5446

md5login opened this issue Feb 3, 2024 · 0 comments

Comments

@md5login
Copy link

md5login commented Feb 3, 2024

What is affected?

Component

Description

On a native radio input, if a 'click' (or any other) event default action is being prevented by a listener, it immediately affects the input by preventing the default actions to take place.

<md-radio>'s built-in event handling is not affected by preventing default of an event. Was this code supposed to allow the user to process the event before taking actions? If so, I believe it should wait for a macrotask instead,

Furthermore, same behavior could be observed in any component's event handling, where await 0 or await null is used.

Reproduction

The described behavior can be observed here

Workaround

None

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

1.1.1

Browser/OS/Node environment

Browser: Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0
OS: Windows NT 10.0; Win64; x64

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

1 participant