Skip to content

fix: Windows checkboxChecked edge case#21852

Merged
zcbenz merged 1 commit intomasterfrom
fix-edge-checkbox-case
Jan 22, 2020
Merged

fix: Windows checkboxChecked edge case#21852
zcbenz merged 1 commit intomasterfrom
fix-edge-checkbox-case

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 recently label Jan 21, 2020
@codebytere codebytere force-pushed the fix-edge-checkbox-case branch from 7bae38d to 8fd3fb4 Compare January 21, 2020 23:26
Copy link
Contributor

@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 recently 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