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

Add force argument to triggerEvent #1521

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrmlt
Copy link

@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.
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

Successfully merging this pull request may close these issues.

1 participant