-
Notifications
You must be signed in to change notification settings - Fork 47.3k
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
DOM Fixture Form Coverage: Restored State and Auto-fill #10468
Comments
@aweary @nhunzaker can I work on this? |
@wuweiweiwu Hey! Sorry, just catching up on issues! That would be wonderful! |
Awesome! I'll get started asap! I'll definitely reach out if I have any questions |
Hey @wuweiweiwu! There's absolutely zero obligation to make headway on this, but I just wanted to follow up and see if you had any questions or hit any snags that have blocked you from making headway. If not, no worries! I'll check in again in three weeks. |
Of course! Ive been taking some time to get more familiar with the codebase so I should have some progress soon! Thanks! :) |
@wuweiweiwu Following up from Twitter, I'm able to reproduce the form restore effect with the following example: https://codesandbox.io/s/rl394q5pm The example likes to open the wrong HTML file, you might have to view it here: But basically:
This works by sending a postMessage event to the form document, effectively letting you see the behavior without navigating back-and-forth on the main window. I wonder if we could demonstrate this with React. As far as I can tell, change and input events are not fired when you click "back". |
I wonder if you can render straight to the |
@nhunzaker I found that I was able to create an iframe and use the ref to mount something onto it. However, I was running into some issues where when I submitted the form, the form disappears unless I disabled the default action and subsequent any help is much appreciated! |
I played around a bit with your fixture (awesome, btw!) and I'm starting to think that we need to load a completely new page instead of using a portal. It seems like something gets hung up when the form is submitted that messes up history. I think, ideally, we just use the main fixtures page to navigate back and forth, but the iframe contents is a totally different document. That might require some deeper changes to the fixtures. Until that time, I wonder if we could vet the idea by creating a static frame.html in the public directory that pulled in the latest React UMD modules. |
I see. I'll give that a try! Do you mean the fixture test would be embedding that actual iframe url ( |
Yes. Like |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution. |
Putting this back up for grabs |
Hey guys, would it be alright if I picked this up? I understand this issue has open since 2017, so I'm not sure if it's still valid/open. |
Hey @hassan-alam, sure thing! Let me know if there's anything I can help with. |
@nhunzaker Thanks man, is there any way you could change the label to |
Yep. It's all yours! |
@nhunzaker So if I understand it correctly, I need to create an iframe referencing an html document in Also, for the auto-complete test-case, I understand that this is super browser dependant, but I was able to create a fixture that worked for me (using Chrome autofill in incognito and separately with the Dashlane extension). Is that all I need? |
Created PR for half of the ticket: #17951 |
Hey @hassan-alam, sorry to go quiet. I owe you a response, and I'll take a look at the PR. Thank you for your time figuring this out; this looks promising for a problem that is otherwise difficult to demonstrate. I'll dive in. |
@nhunzaker Hey man, don't worry about it. The PR is also only for the autofilled form-state portion of this issue (since I had trouble understanding the best way to do restored form state). |
@nhunzaker The PR was merged, so the I'm not sure the best way to proceed for the |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
@nhunzaker @hassan-alam I would like to pick the Restored form state part and work on it. So can you tell me how to proceed in this case ? |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
Follow up from #10456. Presently, we don't have a manual fixture that ensures that form state is captured when the browser provides input on behalf of the user.
Other notes
As a reference point, I'd like to find some documentation around how restored state works. I think I might be using the wrong search terms. Does anyone have a link handy?
The text was updated successfully, but these errors were encountered: