<input type="radio">/<input type="checkbox"> do not block the default action of parent links
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Webcompat Priority | P3 |
People
(Reporter: orstavik77, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0
Steps to reproduce:
In this template:
<a href="#radio-interference">
<input type="radio" name="x">
<input type="radio" name="x">
</a>
<a href="#checkbox-interference">
<input type="checkbox">
</a>
I click on
a) a radio-button or
b) the checkbox.
Actual results:
1a. The radio button gets selected.
AND
2a. The page navigates to #radio-interference
1b. The checkbox toggles
AND
2b. The page navigates to #checkbox-interference
Expected results:
- Only the radio button/checkbox should toggle.
The HTMLAnchorElement's default action of navigation should not occur in addition to the HTMLInputElement's default action.
Why?
- It would be confusing if two such default actions occurred at the same time/in response to the same event instance Yes, there can be two default actions associated with one event instance, but no, these two default actions should mutually exclude each other.
- Chrome 81.0.4044.129 and WebKitGTK 2.28.2 only triggers the default action nearest the innermost target: they don't navigate also.
Reporter | ||
Comment 1•4 years ago
|
||
----------testfile.html------------------
<a href="#radio-interference">
<input type="radio" name="x">
<input type="radio" name="x">
</a>
<a href="#checkbox-interference">
<input type="checkbox">
</a>
-
click on the radios/checkbox and see both the results in the browser (the buttons toggle AND the hash changes).
-
repeat test in Chrome and Safari, and see they behave differently (the hash in the url doesn't change).
Updated•4 years ago
|
Comment 2•4 years ago
|
||
I'm not sure how this is serious because according to the Alice-san's bug list, this is long standing bug.
Reporter | ||
Comment 3•4 years ago
|
||
Added a related bug. It illustrates how the conflict between the form/input vs. aHref are resolved differently in other similar situations.
https://bugzilla.mozilla.org/show_bug.cgi?id=1658511
Updated•4 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•