Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-26229

Clicking Create in the user creation modal can do nothing when the password confirmation is filled first

    XMLWordPrintable

Details

    • Unknown

    Description

      Clicking the Create button of a form using the registration macros can do nothing, without any error, when the password confirmation was filled before the password. This is visible in the user creation modal of the administration (Users section) and can also affect the registration page.

      Steps to reproduce

      1. Go to Administration > Users and click Create user.
      2. Fill the first name, last name and username.
      3. Fill the Confirm password field, then wait about one second.
      4. Type the same value in the Password field.
      5. Click Create right away, without leaving the password field first.

      Expected results

      The user is created.

      Actual results

      Nothing happens: no request is sent, no message is displayed and the modal stays open.

      Cause

      The confirmation is validated about 500 milliseconds after its last keystroke, so the "The two passwords do not match." message is displayed while the password is still empty. It is only validated again when the password field loses the focus. Pressing the mouse button on Create blurs the password field, the message disappears, and the button moves up by the height of the message. The mouse button is released outside of the button, so the browser does not trigger a click and the form is not submitted.

      The re-validation of the confirmation on the password blur was introduced by XWIKI-22121.

      Environment

      Reproduced on master (19.0.0-SNAPSHOT) and stable-17.10.x, Chrome and Chromium, with both Selenium and a real mouse. It makes the UsersGroupsRightsManagementIT tests flicker (XWIKI-25059, XWIKI-25859).

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              mleduc Manuel Leduc
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: