-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
<button> shouldn't have activation behavior when it is not in a form #1567
Comments
Looks like Don't know about type=menu. Does any engine even support it? |
type=menu is tracked in #237. Buttons in the button state already have an activation behavior of "Do nothing". Is the bug report here to be more explicit that "Do nothing" means "has no activation behavior" and thus fails to trigger the "If target has a defined activation behavior" clause? |
It is hard to parse "Do nothing" as "does not have activation behavior" (since I can imagine cases when there is some valid activation behavior and it could be 'do nothing'). |
That makes sense. I am just imagining the intent was for it to be "does not have activation behavior" since that gives reasonable results, but it definitely could be clearer about this. |
#1568 is related issue. |
Testing with
now the form is submitted in Safari/Chrome/Firefox. But without a form the link is followed:
|
I would suggest we fix this as follows:
|
data:text/html,<a href="data:text/html,link followed"><button>click me</button></a>
follows the link in Gecko and Blink.Spec says in https://html.spec.whatwg.org/multipage/interaction.html#nearest-activatable-element
"If target has a defined activation behaviour, then return target and abort these steps."
And
button
has activation behaviorhttps://html.spec.whatwg.org/multipage/forms.html#the-button-element:activation-behaviour
Even for state Button it has it, even though the activation behavior is to do nothing.
The text was updated successfully, but these errors were encountered: