Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34950 closed defect (bug) (fixed)

Confirm weak password checkbox not hidden when process cancelled

Reported by: ChemicalSailor Owned by: swissspidy
Priority: normal Milestone: 4.5
Component: Users Version: 4.3
Severity: normal Keywords: has-patch commit
Cc: Focuses: ui, javascript, administration

Description

When changing user password, if a user enters a weak password, then cancels the process, the confirm weak password table row is not re-hidden.

Steps to recreate: Go to profile.php, generate new password, enter a weak password, cancel process

Attachments (3)

34950.patch​ (545 bytes ) - added by subharanjan 11 years ago.
Hides and Reset the checkbox "Confirm use of weak password " on click on Cancel button
34950-Revised.patch​ (578 bytes ) - added by subharanjan 11 years ago.
34950.2.patch​ (496 bytes ) - added by swissspidy 11 years ago.
Simplified patch

Download all attachments as: .zip

Change History (11)

#1 @swissspidy
11 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review → 4.5

Can confirm. The checkbox only goes away when generating a new password or inserting a stronger one manually.

@subharanjan
11 years ago

Hides and Reset the checkbox "Confirm use of weak password " on click on Cancel button

#2 @subharanjan
11 years ago

  • Keywords has-patch added; needs-patch removed

@swissspidy
11 years ago

Simplified patch

#3 @swissspidy
11 years ago

  • Keywords commit added
  • Owner set to swissspidy
  • Status new → assigned

#4 @swissspidy
11 years ago

Some additional notes on my patch:

  • The if ( $weakCheckbox.prop( 'checked' ) ) check isn't necessary. We can simply uncheck it all the time here.
  • normal is not a valid value for .hide(). Using the default value (200ms) leads to the checkbox animation taking longer than the other animation, using 0 makes it more simultaneous.

#6 follow-up: @subharanjan
11 years ago

@swissspidy Thanks for correcting the patch. I am sorry with that extra unnecessary if check. However, as per this ​http://www.w3schools.com/jquery/eff_hide.asp the default value seems to be 400ms. Thank you :)

Last edited 11 years ago by subharanjan (previous) (diff)

#7 in reply to: ↑ 6 @afercia
11 years ago

Replying to subharanjan:

the default value seems to be 400ms. Thank you :)

I think setting the duration to 0 it's a way to use the animation syntax (which allows to pass a "complete" callback) and still have the element immediately hidden.

#8 @swissspidy
11 years ago

  • Resolution → fixed
  • Status assigned → closed

In 35870:

Passwords: Hide weak password confirmation checkbox when password strength improves.

Props subharanjan for initial patch.
Fixes #34950.

Note: See TracTickets for help on using tickets.