Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59527

Race condition with auto-complete

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Enable debugging.
      2. Login as admin
      3. Edit the manager role so it can be assigned at the user context
      4. Open the page "Site administration -> Users -> Permissions -> Assign user roles to cohort"
      5. Inspect the page and browse the sources tab to open first.js
      6. Search for updateSuggestions function and put a breakpoint on the first line.
      7. Click on the down arrow for the user selector.
        1. Verify the breakpoint only triggers once!
      Show
      Enable debugging. Login as admin Edit the manager role so it can be assigned at the user context Open the page "Site administration -> Users -> Permissions -> Assign user roles to cohort" Inspect the page and browse the sources tab to open first.js Search for updateSuggestions function and put a breakpoint on the first line. Click on the down arrow for the user selector. Verify the breakpoint only triggers once!
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59527-master

      Description

      There is a hard to reproduce race condition when using an auto-complete input that gets it's results from a webservice. Sometimes (rarely - I can't even do it) - the first time the down arrow is clicked, the suggestions list will say "No suggestions" even if there were valid results.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Sep/17