Repository navigation
Fix Data Vault autofill and keep identities active across multi-step signups - #15
Merged
Merged
Conversation
…signups Autofill left forms empty or garbled: - With "Minimize CDP footprint" on, rebrowser's enableDisable mode resolves the main world to a blank about:blank context on fingerprint-chromium, so page.$ returned null for every field and the fill failed instantly. All field work now runs in the widget's isolated world (works on both engines). - The trusted focus click landed on whatever covered the field, often the autofill panel itself, which clicked another identity row and started a parallel fill. Click points are now hit-tested (DOM focus otherwise), focus is re-checked every keystroke, fills are serialized per tab, and the panel closes when an identity is picked. - The result toast rendered under the panel at 48px wide; it now sits on top at a readable width and stays up longer for longer messages. Multi-step signups lost the identity after step 1 because it was marked used immediately. It now stays active per site (registrable domain, 30 min idle) across in-page steps, route changes and page loads, fills each new step's empty fields (never the password, which still needs a click), and is marked used only on the final submit. The panel pins it as "In progress" with Mark as used / Release. Firefox gets the same via the extension background.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
Smart Autofill (Data Vault) left forms empty or garbled.
enableDisablemode resolves the main world to a blankabout:blankcontext on fingerprint-chromium, sopage.$returnednullfor every tagged field and the fill failed in ~10 ms ("Could not fill this form - nothing was entered").Multi-step signups lost the identity after step 1, because it was marked used immediately; it disappeared from the list and later steps had nothing to fill with.
What changed
browserEngine.js: the fill loop does all DOM work in the widget's isolated world (personaPrepareTarget/personaFocusTarget/personaIsFocused/personaCommitTarget/personaSetSelect). A click is used only whenelementFromPointhits the field; otherwise DOM focus. Focus is re-checked before every keystroke. Fill plans are serialized per tab.__sgPersonaActivehandler; mark-used uses the URL recorded when the identity became active and then releases it.personaAutofill.js: picking an identity closes the panel and blocks a second pick while filling; a fill makes the identity active instead of marking it used; later steps (same page, SPA route change, or a new page) auto-fill empty fields - never the password; the final submit (Sign up / Register / Submit / Create account / Finish ...) marks it used while Next / Continue keep it; panel pins it as "In progress" with Mark as used / Release; toast fixed.pageBridge.js:keepaliveon the fetch transport so a mark-used sent during the final navigation still lands.sg-bridge.js/sg-background.jskeep the active identity per tab + site;sg-widget.jsregenerated. The signed.xpistill needs re-signing to ship these to Firefox profiles.Testing
npm test: 648/648 on this tree (test/autofillFillEngine.test.jsis new).Stacked on #14.