Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33897 closed defect (bug) (fixed)

Hide/ Show password button not working after clicking cancel

Reported by: umeshnevase's profile umesh.nevase Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.3
Component: Users Keywords: has-patch
Focuses: ui, accessibility, javascript Cc:

Description

I've found bug on User profile page and New user page after updating wordpress to 4.3.1. I've tried to explain the scenario below.

When user clicks on Generate password button then Password field,'Hide/Show' toggle button and 'Cancel' button get visible and 'Hide/Show' toggle button shows 'Hide' text.

After that, click on 'Hide' button, then password field hides the password text and 'Hide/Show' toggle button get set to 'Show'.

After that, click on cancel button, All the fields get hide. till these steps all is working fine.

But when user again click 'Generate password' button, all the above elements get visible, the password field shows text password visible but the 'Hide/Show' toggle button display as 'Show' button instead of 'Hide' button. Also the When user clicks 'Password' and 'New password' lable, the password text field not get focused. it looses focus when user cancel button.

I've attached screenshot for the issue.

Attachments (3)

profile-password-edited.png (70.5 KB) - added by umesh.nevase 9 years ago.
I've attached screenshot for issue coming after the steps explained in scenario
33897.diff (744 bytes) - added by umesh.nevase 9 years ago.
I've added patch to fix the issue
33897.1.diff (969 bytes) - added by umesh.nevase 9 years ago.
reset the "Hide/Show" toggle button after clicking cancel.

Download all attachments as: .zip

Change History (11)

@umesh.nevase
9 years ago

I've attached screenshot for issue coming after the steps explained in scenario

#1 @SergeyBiryukov
9 years ago

  • Component changed from Administration to Users

@umesh.nevase
9 years ago

I've added patch to fix the issue

@umesh.nevase
9 years ago

reset the "Hide/Show" toggle button after clicking cancel.

#2 @umesh.nevase
9 years ago

I've added 2 patch files 33897.diff​ for reset the toggle button after clicking 'Generate password' button and 33897.1.diff​ for reset the toggle button after clicking 'Cancel' button

#3 @adamsilverstein
9 years ago

@umesh.nevase: Thanks for the bug report and the patches.

I was able to reproduce the bug following the steps you outlined. I haven't yet had a chance to test your fix. Looking at the code, I wonder if we may be able to apply the existing toggle logic for the show/hide button?

#4 follow-up: @adamsilverstein
9 years ago

  • Owner set to adamsilverstein
  • Status changed from new to assigned

#5 in reply to: ↑ 4 @umesh.nevase
9 years ago

Replying to adamsilverstein: I've checked by existing toggle logic but, it was not worked. So I've added these line fore reset the buttons text.

#6 @umesh.nevase
9 years ago

  • Keywords has-patch added

#7 @wonderboymusic
9 years ago

  • Milestone changed from Awaiting Review to 4.4
  • Owner changed from adamsilverstein to wonderboymusic

#8 @wonderboymusic
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 34539:

Profile: when clicking "Generate Password", toggling visibility, then canceling, ensure that the UI resets properly for when the "Generate Password" button is clicked again.

Props umesh.nevase.
Fixes #33897.

Note: See TracTickets for help on using tickets.