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

Form restoration interop #7292

Open
annevk opened this issue Nov 3, 2021 · 1 comment
Open

Form restoration interop #7292

annevk opened this issue Nov 3, 2021 · 1 comment
Labels
interop Implementations are not interoperable with each other topic: forms topic: history

Comments

@annevk
Copy link
Member

annevk commented Nov 3, 2021

As discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=654072 it might be good to have more alignment about what form restoration entails. Questions that came up:

  • Is disabled restorable state?
  • Should restoration happen on "soft" reload?
  • Should there be an event? It sounds like pageshow might be good enough for this, provided things are restored at that time. As noted in Clarify that form state restoration does not fire events #7283 it seems developers could also use formStateRestoreCallback for this, which makes it very observable when exactly this process takes place...

Further context: #6853 (comment).

cc @gijsk @whatwg/forms

@calebdwilliams
Copy link

Not sure if there has been any movement on this that hasn't been tracked on here specifically, but I would argue for

Is disabled restorable state

that for the custom element reaction, that specific state should be opt-in-able via the state previously set on ElementInternals.prototype.setFormValue since that method accepts both a form value and a state. Although it appears as if even Chrome is no longer calling formStateRestoreCallback with the previous state, only the value(warning: overly-simplistic demo).

What I'm confused about (and maybe this is a separate issue) is how, exactly, the formStateRestore reaction should be triggered in the case of autocomplete. This is beginning to be an issue for the teams I support. If this is the right place to discuss that behavior, let me know; otherwise, I'd be happy to create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Implementations are not interoperable with each other topic: forms topic: history
Development

No branches or pull requests

2 participants