Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #52086, comment 37


Ignore:
Timestamp:
02/20/2022 08:01:02 PM (3 years ago)
Author:
mirkolofio
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #52086, comment 37

    initial v1  
    33If you use CTRL+SHIFT+R (no cache reload), it's happening 100% of times in my setup btw. As above, it's not a fast website, and it's happening with SCRIPT_DEBUG enabled/disabled. No difference.
    44
     5**UPDATE** this is happening only if you have pass1 field autocompleted by the browser. This is the condition to trigger the flow described below:
     6
     7https://github.com/WordPress/WordPress/blob/master/wp-admin/js/user-profile.js#L182
     8bindPass1() makes use of generatePassword() which makes use of $toggleButton (still undeclared at this point).
     9
     10But $toggleButton is defined later on, here:
     11https://github.com/WordPress/WordPress/blob/master/wp-admin/js/user-profile.js#L212
     12
     13So I think the patch attached to this post will work, but moving bindToggleButton() before line 180 would be even better.