Autocomplete throbber is visible when entering a blacklist character

Created on 30 June 2023, over 1 year ago
Updated 5 July 2023, over 1 year ago

Problem/Motivation

Since Drupal 10.1.0, the autocomplete throbber in link fields (both content type, as well menus) stays visible when starting the input with any of the first character blacklist characters /#?.

This was not happening with any version prior to 10.1.0

Steps to reproduce

Find any link autocomplete field, enter any of the first character blacklist characters.

🐛 Bug report
Status

Fixed

Version

10.1

Component
Claro 

Last updated about 12 hours ago

Created by

🇮🇹Italy dgsiegel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dgsiegel
  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    29,443 pass
  • 🇫🇮Finland lauriii Finland

    This should address the bug. I wanted to add tests for this in core/tests/Drupal/Nightwatch/Tests/claroAutocompleteTest.js but I couldn't get Nightwatch working locally 😬

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Build Successful
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    29,443 pass
  • 🇫🇮Finland lauriii Finland

    Got my Nightwatch setup working 👍 Here's test coverage and an updated fix.

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Maybe I'm missing a step but applying the patch

    Added an entity reference field to the Article content type
    Typed '/' and I see the throbber and "loading" flash very quickly.

    Shouldn't I not see that?

  • Status changed to Needs review over 1 year ago
  • 🇫🇮Finland lauriii Finland

    The bug is specific to the link autocomplete which is supposed to have the autocomplete disabled when the string starts with a character from the ignore list /#?. You can test this by adding a link to a menu.

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Forgot to add my tag earlier.

    Tested on a menu link and now see what you are referring to.
    Patch solved the issue.

    Side note. Should publish an article on setting up nightwatch. Still can't really get it working on ddev.

    • bnjmnm committed c1fdf4e7 on 11.x
      Issue #3371571 by lauriii, smustgrave: Autocomplete throbber is visible...
    • bnjmnm committed f597d0ec on 10.1.x
      Issue #3371571 by lauriii, smustgrave: Autocomplete throbber is visible...
  • Status changed to Fixed over 1 year ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Manually tested and looked over the code. The issue is specific to Claro (and likely evaded tests) as it is due to an 'autocompletesearch' event listener that adds the class on any attempted search, even if it begins with a character that results in the search ultimately not happening. Solution looks simple enough and the failing test proves it was a problem. Nice fix!

    Committed to 11.x and cherry-picked to 10.1.x since it's a not-particularly-disruptive bugfix.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024