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

Text field "no suggestions" box remains visible sometimes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.1
    • 3.0
    • 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.

      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.

            ryanwyllie Ryan Wyllie
            cameron1729 cameron1729
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.