Skip to content

Password manager autofill overlay (Bitwarden/1Password/LastPass) breaks the SPA after login #80

Closed

Description

@JuansesDev

Symptom

After signing in, certain buttons stop responding — most reproducibly + New Project on the dashboard and + New Template inside a project. The page does not throw a visible error, but clicking the affected buttons either does nothing or leaves the page in a half-loading state until the next full reload (Cmd/Ctrl+Shift+R).

The bug is only present when a password-manager browser extension is active. Confirmed reproducer: Brave + Bitwarden. Disabling the extension makes the bug disappear immediately. The same root cause should affect 1Password, LastPass and Dashlane.

Repro

  1. Sign in normally with Bitwarden enabled (Brave or Chromium-based browser).
  2. On the Projects dashboard, click + New Project.
  3. Either nothing happens, or the modal opens but subsequent clicks are dead.
  4. Open DevTools → Console — you'll see one or more entries like:
bootstrap-autofill-overlay.js:16 Uncaught (in promise) NotFoundError:
Failed to execute 'insertBefore' on 'Node':
The node before which the new node is to be inserted is not a child of this node.
  1. Disable Bitwarden, hard-reload, repeat — the issue is gone.

Root cause

Bitwarden's content script (bootstrap-autofill-overlay.js) scans every input element on the page and attaches an inline autofill overlay (the small icon + dropdown) by inserting a sibling node next to the input. The reference node is captured when the input is first observed.

Our modals (AppModal.vue) use Vue's <Teleport to=\"body\">. When a modal opens, the form/input nodes are physically moved from their original DOM position to document.body. The overlay's stored reference node is now an orphan. The next time Bitwarden re-renders its overlay (after a Vue patch), insertBefore throws because the reference is not a child of the parent it expects.

The unhandled rejection corrupts the extension's internal DOM tracking, which in turn intercepts subsequent click events on the same page until the next hard reload.

Fix applied

Defensive opt-out of password-manager autofill on every input that is not a credentials field. Three files:

  • frontend/src/components/ui/AppInput.vue — new optional autocomplete prop. When not set, the input renders with autocomplete=\"off\" plus the recognized opt-out attributes for the four major password managers: data-bwignore (Bitwarden), data-1p-ignore (1Password), data-lpignore (LastPass), data-form-type=\"other\" (Dashlane). When the prop is set, none of those attributes are emitted — the input opts into autofill normally.
  • frontend/src/views/login/LoginView.vue — explicit autocomplete=\"email\" and autocomplete=\"current-password\" on the login form so Bitwarden still autofills credentials.
  • frontend/src/views/register/RegisterView.vue — explicit autocomplete=\"name\" | \"email\" | \"new-password\" for the same reason.

Every other input in the app (project name, template name, workspace name, subscriber email, SMTP settings, etc.) keeps the default opt-out, so Bitwarden never tries to attach overlay UI to them. No more orphan-node crash.

Why this works

Password-manager extensions advertise these opt-out attributes specifically to handle SPAs and Teleport-style component movement. We respect them on non-credential fields, the extension stays away, no overlay → no insertBefore → no broken DOM.

Tested

  • ✅ Brave + Bitwarden enabled → + New Project and + New Template modals open cleanly post-login, no console error, repeat opens work.
  • ✅ Bitwarden still autofills email + password on /login and saves new credentials on /register.

Fallback if any user reports it again

If a future password-manager update bypasses the opt-out attributes, the next step is to remove <Teleport to=\"body\"> from AppModal.vue and render the modal in place. Slightly worse stacking semantics but immune to the issue.

Activity

  1. added
    bug
    on Jun 22, 2026
  2. JuansesDev commented on Jun 22, 2026

    @JuansesDev
    MemberAuthor

    Update — defensive attributes were not enough

    User-reported follow-up: re-enabled Bitwarden after testing the initial fix and confirmed the bug still reproduces once the extension is logged in. The opt-out attributes (data-bwignore, data-1p-ignore, etc.) only prevent autofill behavior — Bitwarden still attaches its inline overlay UI to every input regardless, which means the orphan-reference crash is unchanged when those inputs sit inside a <Teleport>.

    Promoted to plan B: removed <Teleport to="body"> from AppModal.vue. The modal now renders in-place where it's declared, but still uses position: fixed inset-0 z-50 to overlay the viewport.

    Why this is safe in the current app

    Audited every ancestor of every AppModal usage for the properties that break position: fixed (transform, filter, perspective, backdrop-filter, will-change). App.vue is a flat RouterView + AppToast. None of the layout components (ProjectView, dashboardView, etc.) apply any of these properties. The only transform usages live in AppToast (transient slide-in animation) and UpdateBadge (text-transform: uppercase, which is unrelated).

    What changed

    • frontend/src/components/ui/AppModal.vue — dropped the <Teleport to="body"> wrapper. Same markup, same fixed inset-0 z-50 positioning.

    What stays from the first attempt

    The defensive data-bwignore / data-1p-ignore / data-lpignore / data-form-type="other" attributes in AppInput.vue and the explicit autocomplete=... opt-in on login/register stay. They're still valuable as a cooperative signal: password managers may decide not to even attach overlay UI to fields tagged this way, reducing future blast radius. The Teleport removal is the load-bearing fix.

    Future caveat

    If we ever wrap any layout component in a CSS transform (animations, parallax, etc.), modal positioning will break. Worth keeping in mind, but the SPA is unlikely to need that.

  3. added a commit that references this issue on Jun 22, 2026
    b714ff1
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

    bugfrontendux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions