Skip to content

Save the ticked widget's value as the field value of a checkbox group - #22192

Open
LoukasPap wants to merge 1 commit into
mozilla:masterfrom
LoukasPap:fix/ticked-box-false-save
Open

LoukasPap wants to merge 1 commit into
mozilla:masterfrom
LoukasPap:fix/ticked-box-false-save

Conversation

@LoukasPap

Copy link
Copy Markdown

Fixes #22183

When a check box field has several widgets (e.g. a "Yes"/"No" pair), the field's value was saved as /Off if the unticked widget happened to be saved first. It now always matches the ticked widget, and is /Off only when none is ticked.

When a check box field has several widgets (e.g. a "Yes"/"No" pair),
`_saveCheckbox` called `setValue` for every widget, ticked or not.
`setValue` only writes the parent's `/V` for the first widget saved, so
when the unticked widget was saved first the field was saved as
`/V /Off` while the ticked widget got `/AS /<state>`.

Let a ticked widget override the value set by a previously saved
unticked one, and keep `/Off` for the case where no widget is ticked.

Fixes mozilla#22183

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@codecov-commenter

codecov-commenter commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.40%. Comparing base (43c5e0d) to head (a95ba1b).
⚠️ Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #22192   +/-   ##
=======================================
  Coverage   90.40%   90.40%           
=======================================
  Files         277      277           
  Lines       68051    68051           
=======================================
+ Hits        61523    61524    +1     
+ Misses       6528     6527    -1     
Flag Coverage Δ
browsertest 66.23% <100.00%> (+0.01%) ⬆️
fonttest 8.98% <ø> (ø)
integrationtest 69.36% <0.00%> (+<0.01%) ⬆️
unittest 60.59% <100.00%> (ø)
unittestcli 58.38% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Viewer preview

Commit a95ba1b (build logs).

Viewer Build Preview
Modern (gulp generic) ✅ not published
Legacy (gulp generic-legacy) ✅ not published

🔒 A user with write access must approve this commit with the viewer-preview label to publish the viewers.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Ticking the second box of a Yes/No check box pair saves the field as /V /Off

3 participants