Fix the failure of testing/web-platform/tests/html/semantics/forms/the-input-element/checkable-active-onblur.html
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
()
Details
(Keywords: parity-chrome, parity-safari)
Attachments
(1 file)
The failures are caused by:
- Gecko does not activate
<input type="checkbox">
and<input type="readio">
when user presses the space key. - Gecko makes all ancestors active when an element gets activated.
- Gecko does not inactivate elements when active element gets lost focus.
The 2nd issue is not intended to check with the test. Therefore, we should fix this in the test side.
On the other hand, the 1st and 3rd issues are real issues. This difference could cause different look and feel in some web apps.
Assignee | ||
Comment 1•3 years ago
|
||
First, the test compares document.querySelector(":active")
and a checkbox or
a radio button. However, Gecko activates ancestor elements too. Therefore,
Gecko returns <html>
element or null
for the selector. However, this is
an issue of CSS pseudo class compatibility which is not scope of the test.
Therefore, this patch makes it compare document.querySelector("input:active")
and a checkbox or a radio button instead.
Next, Gecko does not activate checkboxes and radio buttons when user presses
the space key, but the other browsers do it. Therefore, this patch makes
HTMLInputElement::PostHandleEvent
do it and
EventStateManager::PostHandleEvent
clear it at keyup
of the space key.
Next, Gecko does not inactive active elements when it gets lost focus.
Therefore, this patch makes nsFocusManager::NotifyFocusStateChange
do it
like the other browsers.
Finally, with manual testing of draft patches, I found some issues of
inactivating them when they are activated by <label>
s. Therefore, I add new
tests in a separate file. Note that Chrome fails only in the cases testing
<input type="radio">
with <label>
.
Comment 4•3 years ago
|
||
bugherder |
Assignee | ||
Comment 6•3 years ago
|
||
Description
•