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

Text field "no suggestions" box remains visible sometimes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0.1
    • Tags
    • MOODLE_30_STABLE
    • MOODLE_30_STABLE
    • MDL-52042-master
    • 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.

    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

              ryanwyllie Ryan Wyllie
              cameron1729 cameron1729
              cameron1729 cameron1729
              Dan Poltawski Dan Poltawski
              Frédéric Massart Frédéric Massart
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                21/Dec/15