Skip to content
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

fix: Windows checkboxChecked edge case #21852

Merged
merged 1 commit into from Jan 22, 2020
Merged

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Jan 21, 2020

Description of Change

Closes #21831.

Most of the checkbox plumbing was fixed earlier, but one edge case remained; if you started with checkbox_checked false, and then checked true. This final bit: checkbox_checked ? verificationFlagChecked : false led to the following logic flow:

checkboxChecked: false -> user leaved unchecked -> checkboxChecked === false (correct ✅)
checkboxChecked: true -> user unchecks -> checkboxChecked === false (correct ✅)
checkboxChecked: false -> user checks -> checkboxChecked === false (incorrect 🔴 )
checkboxChecked: true -> user leaves checked -> checkboxChecked === true (correct ✅)

We shouldn't be gating the final return value on checkbox_checked; it only reflects the initial checked state. We simply need to return verificationFlagChecked, as it defaults to false anyway.

cc @nornagon @deepak1556

Checklist

Release Notes

Notes: Fixed an edge case in checkbox logic on Windows.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 21, 2020
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how much check could a checkbox check if a checkbox could check checks?

@zcbenz zcbenz merged commit 11804df into master Jan 22, 2020
@release-clerk
Copy link

release-clerk bot commented Jan 22, 2020

Release Notes Persisted

Fixed an edge case in checkbox logic on Windows.

@zcbenz zcbenz deleted the fix-edge-checkbox-case branch January 22, 2020 07:38
@trop
Copy link
Contributor

trop bot commented Jan 22, 2020

I have automatically backported this PR to "7-1-x", please check out #21860

@trop trop bot removed the target/7-1-x label Jan 22, 2020
@trop
Copy link
Contributor

trop bot commented Jan 22, 2020

I have automatically backported this PR to "8-x-y", please check out #21861

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

checkboxChecked still not working in 7.1.9
4 participants