Skip to content

Let apps commit or cancel the autofill session on Skia targets #26665

Open

Description

@Xiaoy312

What would you like to be added? 💡

A public API for an app to end the current autofill session: tell the platform the form was submitted (offer to save the credentials) or abandoned (discard them). This is the equivalent of AutofillManager.commit() / cancel() on Android.

With #26609, Skia Android exposes TextBox/PasswordBox fields to the autofill service and reports when they become hidden. Android only offers to save credentials when every field of the session is gone, so today the save prompt shows only when the form is navigated away from or collapsed.

The plumbing already exists, but is not reachable by apps:

  • ITextBoxNotificationsProviderSingleton.FinishAutofillContext(bool shouldSave), implemented on Android (TextInputPlugin.FinishAutofillContext → Commit() / Cancel()), no-op on the other Skia hosts.
  • The public entry point FinishAutofillContext(bool shouldSave), marked // TODO: Discuss this public API., was disabled in 163100d (now in TextBoxCore.Input.cs under #if false).

Possible shape, next to the other Uno-specific TextBox APIs:

// After a successful login:
Uno.UI.Xaml.Controls.TextBoxExtensions.FinishAutofillContext(shouldSave: true);
  • Android: AutofillManager.Commit() / Cancel() for the autofill session of the window.
  • iOS: to be checked whether the Skia host has an equivalent; no-op otherwise.
  • Other Skia targets: no-op.

Open questions: a static method vs. something scoped to a XamlRoot/window, and the name (FinishAutofillContext vs. CommitAutofill/CancelAutofill).

Why is this needed? 🤔

A login form that stays on screen after submitting (a single-page app, an inline error, a dialog that only updates its content) never hides its fields, so the user is never offered to save the credentials. Native Android apps call AutofillManager.commit() in that case.

For which platforms 📱💻🖥️

Android, iOS

Anything else we need to know? 💬

Follow-up of #26609 (Android autofill for Skia text inputs, part of #26610), raised during its review. Related: #26664 (opt a TextBox out of autofill), which could share the same API class.

Activity

  1. added
    kind/enhancement
    triage/untriaged
    on Nov 23, 2026
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

    kind/enhancementtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions