Skip to content

Conversation

jrmlt
Copy link
Contributor

@jrmlt jrmlt commented Nov 29, 2024

I believe triggerEvent is too restrictive if it forbids all events on a form control with the disabled attribute. While the specification only mentions "click events" and MDN refers to "browsing events," all browsers currently allow mouse tracking events, such as mouseenter and mouseleave, to trigger on disabled controls. Additionally, there are events unrelated to user interaction, like transitionend and animationend.

Beyond known events, there's also the case of CustomEvent, which is entirely valid in browsers but is currently blocked by triggerEvent.

Maintaining a comprehensive list of forbidden or allowed events might not be practical or sustainable. However, I suggest providing testers with an option to trigger events on disabled elements if necessary.

This PR allows to bypass the availability check on a disabled form control using the force argument.

It allows to bypass the availability check on a `disabled` form control.
Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thank you!!

@NullVoxPopuli NullVoxPopuli merged commit 5b8f328 into emberjs:master Sep 10, 2025
@github-actions github-actions bot mentioned this pull request Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants