Closed Bug 1871424 Opened 1 year ago Closed 1 year ago

A possible reoccurrence of Bug 62151: Checkboxes in <a> element cannot be checked or unchecked - v119-v121

Categories

(Core :: DOM: Editor, defect)

Firefox 121
defect

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox121 --- wontfix
firefox122 --- wontfix
firefox123 --- wontfix
firefox124 --- fixed

People

(Reporter: krcowles29, Assigned: edgar)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0

Steps to reproduce:

Enter a website where a photo gallery is displayed containing images grouped with checkbox alternatives. The checkboxes are within <a> elements. I set up a test case for bugzilla developers at https://nmhikes.com/bug. You must be a member to get to the described issue, so a temporary user 'bugzilla' has been created with password 'Bugzilla1$'. Select 'Members->Login' and use the previous info to login. Security questions are answered by entering 'bugzilla'. Once logged in, select 'Contribute->Continue Editing Your Page'. Next, click 'Alamo Vista' under 'Hike/Trail Name'. This will take you to the editor. Click on the tab labeled 'Photo Selection' to see the problem photo gallery - you may have to scroll down to see the photos. None of the checkboxes can be checked or unchecked. Other browsers (Chrome, Safari, Brave) do not have this issue. My user agent is Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0 I believe the issue started with v119 and continues to be present in v120 and v121. It worked as expected prior to that time. Note: I have redesigned the code to remove the <a> parent for the checkboxes in a test case, and the checkboxes work as expected. Hence the belief that the issue is a reoccurrence of Bug 62151.

Actual results:

No checkbox can be altered (either unchecked or checked)

Expected results:

Checkboxes should behave as expected: checking a box should enter a checkmark or remove it if already present.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Editor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Editor
Product: Firefox → Core

Could you use mozregression to find a regression range?

Flags: needinfo?(krcowles29)

(In reply to Robert Longson [:longsonr] from comment #2)

Could you use mozregression to find a regression range?

I will investigate that. I have not used mozregression before, so there may be a learning curve. Thanks for your patience.

Flags: needinfo?(krcowles29)

I downloaded the 118.0 release, and the bug was not present. I then used the mozregression gui, specifying known dates for good and bad. The good date was set at 9-25-2023 (11:44), the date appearing next to the download dir for 118.0 for mac/en-US. The bad date was set at 11-06-2023 (22:21), the date appearing on the download dir for 119.0.1. Regression proceeded back from 11-06-2023 to commit #88f80ffa, which commit still showed the bug. I don't know the commit on the 118 release, but assume you can find that. Is this sufficient info for you to proceed?

You should get a regression range that looks something like this...

Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=636498d041b5&tochange=2a193b7f395c

Flags: needinfo?(krcowles29)

Copy. I'm not familiar yet with mozregression gui, but it appears that the pushlog url is
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=042e4bc9aa5ad9f3477ceb06ded31b642e526b25&tochange=925231a8fb5eccf055afb3e9921596d8f990128b
That was in the Build Info window, along with: repo_name: mozilla-central

Flags: needinfo?(krcowles29)

Thank you so much for the report, and an extra thanks for setting up the test page. I'm able to reproduce, and I'm running mozregression as we speak. Regression range incoming.

Keywords: regression
Regressed by: 1658996

Vincent, Edgar: Is this something worthy of a back out?

Severity: -- → S2
Flags: needinfo?(vhilla)
Flags: needinfo?(echen)

This is a bit bad, investigating ...

(In reply to Andreas Farre [:farre] from comment #8)

Vincent, Edgar: Is this something worthy of a back out?

Bug 1658996 is shipped in 119 and I don't see other bug reports, maybe there is not many pages putting a checkbox under <a>?
Backing out bug 1658996 is a bit risky as there is other bug also depending it.
I prefer we fix this case and request uplift.

The pending patches in Bug 1851970 might fix this. There is a testcase in Event-dispatch-single-activation-behavior.html for putting a checkbox under <a> that is fixed in Bug 1851970. Landing is currently blocked by the spec issue.

See Also: → 62151
Status: UNCONFIRMED → NEW
Ever confirmed: true

Set release status flags based on info from the regressing bug 1658996

Assignee: nobody → echen
Flags: needinfo?(echen)

The root cause of issue is that the link elements have not yet adopted the
activation behavior defined in the specification. This patch add a hacky way to
avoid link elements perform activation behavior if it has a child input element
which will perform activation behavior. This patch introduces new flags instead of
reusing the exiting ones, allowing us to uplift this patch more safely.

Duplicate of this bug: 1866809
Flags: needinfo?(vhilla)
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5431daa798c7 Make input checkbox/radio in link element work again; r=vhilla,dom-core
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch

The patch landed in nightly and beta is affected.
:edgar, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox122 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(echen)

The root cause of issue is that the link elements have not yet adopted the
activation behavior defined in the specification. This patch add a hacky way to
avoid link elements perform activation behavior if it has a child input element
which will perform activation behavior. This patch introduces new flags instead of
reusing the exiting ones, allowing us to uplift this patch more safely.

Original Revision: https://phabricator.services.mozilla.com/D197393

Attachment #9371158 - Flags: approval-mozilla-beta?

Uplift Approval Request

  • User impact if declined: input checkbox/radio doesn't work if it has a link element with href attribute
  • String changes made/needed: None
  • Needs manual QE test: no
  • Is Android affected?: yes
  • Explanation of risk level: This patch tries to minimize changes to fix the regression. It should only affect the activation behavor for the input element that has a link parent
  • Code covered by automated testing: yes
  • Risk associated with taking this patch: Low
  • Fix verified in Nightly: yes
  • Steps to reproduce for manual QE testing: None
Flags: needinfo?(echen)
Attachment #9371158 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Let's let this ride the 122 train to release (shipping 23-Jan). For people interested in testing this fix out now, it's available in current Nightly, Beta, and Developer Edition builds.

Status: RESOLVED → REOPENED
Flags: needinfo?(echen)
Resolution: FIXED → ---
Target Milestone: 123 Branch → ---

:saschanaz, I can not access bug 1874297, can you cc me there? Thanks!

Flags: needinfo?(echen) → needinfo?(krosylight)

Done 👍

Flags: needinfo?(krosylight)
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae7ff06eabe7 Make input checkbox/radio in link element work again; r=vhilla,dom-core,smaug
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: