From 67673525a8e7d30679ff084ce76cdec1083de4bc Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:11:07 +0100 Subject: [PATCH] fix(modal): let password managers autofill the confirmation password Closes #9963 Co-Authored-By: Claude Opus 5.5 --- .../components/modal-confirmation.blade.php | 18 +++++++++++------- tests/v4/Browser/DeleteAccountTest.php | 4 ++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.php index d0d65d2d37..50e41d72df 100644 --- a/resources/views/components/modal-confirmation.blade.php +++ b/resources/views/components/modal-confirmation.blade.php @@ -369,13 +369,17 @@ class="block text-sm font-medium text-gray-700 dark:text-gray-300"> Your Password -
- - -
+ {{-- Add the field when this step shows: password managers do not detect a hidden field that becomes visible. --}} +

@error('password') diff --git a/tests/v4/Browser/DeleteAccountTest.php b/tests/v4/Browser/DeleteAccountTest.php index c5b444f32b..8b22090de9 100644 --- a/tests/v4/Browser/DeleteAccountTest.php +++ b/tests/v4/Browser/DeleteAccountTest.php @@ -38,7 +38,11 @@ it('lets a user delete their own account from the profile page', function () { ->screenshot(filename: 'delete-account-modal') ->fill('[x-model="userConfirmationText"]', 'leaving@example.com') ->screenshot(filename: 'delete-account-confirm-text') + // Password managers detect fields when they are added or focused, not when a hidden one shows. + ->assertScript('() => document.querySelector(\'input[type="password"][x-model="password"]\') === null', true) ->click('button:visible:has-text("Continue")') + ->wait(0.3) + ->assertScript('() => document.activeElement?.matches(\'input[type="password"][x-model="password"]\')', true) ->fill('[x-model="password"]', 'password') ->screenshot(filename: 'delete-account-password');