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

Text field "no suggestions" box remains visible sometimes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.1
    • Component/s: Tags
    • Labels:
    • Testing Instructions:
      Hide

      NOTE:
      This will need to be tested on all supported browsers (IE, Chrome, Firefox, Safari). Please test on IE 11 specifically, as it handles events slightly differently.

      Damyon's comments:
      That focus code was there specifically to handle things like clicking on the menu items in with the mouse (if the blur fires before the focus, the menu closes before the click event - and the click event never fires). This bit of code is finicky - and the behaviour changes across browsers (specially IE11 which fires too many events). Any changes here need careful testing with keyboard and mouse on different browsers.

      1. Pick the testing commit from https://github.com/damyon/moodle/commit/9d2d825ccfee19d234c261e4109dfba462dd07e3
      2. Browse to mymoodle/test.php
      3. Enter "asdf" in the "Single" field, notice the "no suggestions"
      4. Click another text field (NB: You must click directly on a text field, not on anything else)
      5. Confirm: The original "no suggestions" box closes (after a short delay).
      6. Try using some of the other fields and confirm that the suggestion menus appear and disappear as expected. The only time they should stay open after losing focus is if the input regains the focus within 500 milliseconds of losing it.
      Show
      NOTE: This will need to be tested on all supported browsers (IE, Chrome, Firefox, Safari). Please test on IE 11 specifically, as it handles events slightly differently. Damyon's comments: That focus code was there specifically to handle things like clicking on the menu items in with the mouse (if the blur fires before the focus, the menu closes before the click event - and the click event never fires). This bit of code is finicky - and the behaviour changes across browsers (specially IE11 which fires too many events). Any changes here need careful testing with keyboard and mouse on different browsers. Pick the testing commit from https://github.com/damyon/moodle/commit/9d2d825ccfee19d234c261e4109dfba462dd07e3 Browse to mymoodle/test.php Enter "asdf" in the "Single" field, notice the "no suggestions" Click another text field ( NB: You must click directly on a text field, not on anything else) Confirm: The original "no suggestions" box closes (after a short delay). Try using some of the other fields and confirm that the suggestion menus appear and disappear as expected. The only time they should stay open after losing focus is if the input regains the focus within 500 milliseconds of losing it.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull Master Branch:
      MDL-52042-master

      Description

      Steps to reproduce:

      1. Pick the testing commit from https://github.com/damyon/moodle/commit/9d2d825ccfee19d234c261e4109dfba462dd07e3
      2. Browse to mymoodle/test.php
      3. Enter "asdf" in the "Single" field, notice the "no suggestions"
      4. Click another text field (NB: You must click directly on a text field, not on anything else)
      5. Notice the original "no suggestions" box remains.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Dec/15