Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4251

Generate Password modal button may not always work to generate a password

    Details

      Description

      The Generate button works intermittently. Client report with details below:

      The bug can been seen in the SolusVM module when generating a password. See the attached screenshot if any further clarification is needed.

      Expected Behavior

      When the "Generate Password" modal is created, content is loaded from 'client/dialog/password/' which includes a button with classes '.btn.generate'. The content should be loaded before the modal is shown. When the modal is shown, a "click" event handler is added to the button which will generate a random password.

      Actual Result

      A race condition exists between the modal contents being retrieved via an AJAX request and the click event handler being attached.
      Depending on the speed of 'client/dialog/password/', the modal may be shown before the button exists. If this happens, no click event handler is attached to the button and clicking it will do nothing.

      Steps to Reproduce

      An easy way to reproduce this is to intentionally slow down 'client/dialog/password/' by adding a `sleep(1);` in app/controllers/client_dialog.php to the method ClientDialog::password().

        Activity

        Hide
        abdy Abdy Franco added a comment -

        Updated blestaModal() method

        Show
        abdy Abdy Franco added a comment - Updated blestaModal() method

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Jun/21

              Time Tracking

              Estimated:
              Original Estimate - 0 minutes
              0m
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 24 minutes
              1h 24m

                Agile