- Issue created by @utkarsh_33
- Status changed to Needs review
12 months ago 11:05am 24 November 2023 - Status changed to Needs work
12 months ago 2:39pm 24 November 2023 - ๐บ๐ธUnited States smustgrave
Ran the test-only feature
There was 1 failure: 1) Drupal\Tests\user\Functional\UserPasswordResetTest::testFocusIsSetToCorrectPasswordElement Failed asserting that false is true. /builds/issue/drupal-3403612/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121 /builds/issue/drupal-3403612/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55 /builds/issue/drupal-3403612/core/modules/user/tests/src/Functional/UserPasswordResetTest.php:666 /builds/issue/drupal-3403612/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 FAILURES! Tests: 13, Assertions: 322, Failures: 1.
Tested manually as well on a standard install.
Followed the steps where I went to edit my password
I put the wrong password into the current field
some test stuff in the new passsword field
Clicked saved I do see the error but focus is not on the current password field - Status changed to Needs review
12 months ago 5:33am 29 November 2023 - ๐ฎ๐ณIndia srishtiiee
Setting this back to NR as I manually tested the MR and the focus is indeed on the
Current password
field after clickingSave
. @smustgrave Do you have any additional details/steps to reproduce the issue? - Status changed to Needs work
12 months ago 2:48pm 29 November 2023 - ๐บ๐ธUnited States smustgrave
Tested again and still focus is not on current password field
On user edit form
Input incorrect current password
Add some new password + confirm password
Click Save
I see the error around the current password but focus isn't there.So looking at the code I don't see anything that actually puts focus there though, just setting an error. If that's what the ticket is addressing then title and issue summary could be updated, before/after screenshots too.
- Status changed to Postponed: needs info
12 months ago 8:35am 30 November 2023 - ๐ซ๐ฎFinland lauriii Finland
Is this about the focus handling or error styles? The issue summary is talking about focus handling but the MR is adding an error class. We don't have functionality in place that would refocus fields with server side validation errors.
- Status changed to Needs review
12 months ago 6:28am 4 December 2023 I added the reason explaining the the solution that i provided along with the problem with the current code.Hope it makes sense.
- Status changed to Needs work
12 months ago 2:28pm 4 December 2023 - ๐บ๐ธUnited States smustgrave
Sorry but still not clear. Title and summary still talks about the focus, but MR seems to be fixing the error. Which is it suppose to be? Looking at this based on focus when there is an error focus is not on it.
- Status changed to Needs review
12 months ago 11:08am 5 December 2023 - ๐ฎ๐ณIndia TanujJain-TJ
The bug was reproducible on drupal 10.1 and 11. Tested and reviewed this MR manually which fixes the focus issue for
current_password
field. Attaching before and after screenshots for better clarity of this issue. changing the status to NR again.Before
After
- Status changed to Needs work
12 months ago 1:49pm 5 December 2023 - ๐บ๐ธUnited States smustgrave
Thatโs an error but if you hit tab youโre in the toolbar region so focus is not on the error field.
- ๐ฎ๐ณIndia narendraR Jaipur, India
Agree with @smustgrave, and I think this issue is only related to showing error class on correct form element.
Added related tags. - Status changed to Needs review
11 months ago 9:55am 18 December 2023 Agreed with @smustgrave and @narendraR. The issue summary was written correctly.I'm sorry for that.
I have updated the summary and described the real problem.Marking it needs review once again.- Status changed to Needs work
11 months ago 12:28pm 18 December 2023 - ๐ฎ๐ณIndia yash.rode pune
Small suggestion regarding the current approach.
As we are splitting the accounts form in 3 different forms in Users could not find the Change password fields ๐ Users could not find the Change password fields Needs review and this takes care of this edge case in the form validator for the newly created form, So I think if the above MR lands in first then this is not required.