Skip to content

FormControlState cannot express an unread checked/selected state #103

Open

Description

@morisil

Found in the review of the capture-live-form-state branch.

FormControlState.checked / selected are Booleans defaulting to false, so a capture that did not read them removes the markup's checked / selected (for value, null means "keep the markup").

Scenario: the CDP capture turns a missing inputChecked / optionSelected rare-data field into an empty set (?.index.toIndexSet()).
If a Chrome version or a snapshot omits the field, every <input type=checkbox checked> and <option selected> loses its state and the dump shows every box unticked.
A future caller building FormControlState(value = …) without the flags hits the same thing.

Fix: make both Boolean? with null = keep the markup, and have CapturePage pass null when the rare data is absent.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions