Minimal bandaid: take the CredMan early-return BEFORE mutating any session_state_-> fields. This keeps current_field / last_queried_field_rfh_id consistent with session_state_->{form,manager} when the call is dropped. --- a/components/android_autofill/browser/android_autofill_provider.cc +++ b/components/android_autofill/browser/android_autofill_provider.cc @@ -196,6 +196,12 @@ void AndroidAutofillProvider::OnAskForValuesToFill( // StartNewSession is called when the form is focused or the field value is // changed, and we need to set the current_field and last_queried_field_rfh_id // before StartNewSession is called. + if (credman_sheet_status_ == CredManBottomSheetLifecycle::kIsShowing) { + // CredMan prevents 3P autofill UI. Do NOT touch session_state_ here: + // overwriting current_field/last_queried_field_rfh_id without also + // updating form/manager desyncs triggered_origin for an in-flight fill. + return; + } if (!session_state_) { session_state_.emplace(); } @@ -210,10 +216,6 @@ void AndroidAutofillProvider::OnAskForValuesToFill( UpdateCurrentField(manager, form, field); - if (credman_sheet_status_ == CredManBottomSheetLifecycle::kIsShowing) { - return; // CredMan prevents 3P autofill UI. Start the session on refocus! - } - // Focus or field value change will also trigger the query, so it should be // ignored if the form is same. if (!IsLinkedForm(form)) {