Autocomplete widget not working as expected

Created on 21 April 2022, almost 3 years ago
Updated 29 May 2023, almost 2 years ago

Problem/Motivation

Only tested this for classes, not sure if ids and attributes have the same behaviour...

I add a new class "block--images" to block 1. In block 2 I add another classes "block--map" and "block--gmap", but the list of available classes is empty. In block 3 I want to add the class "block--images" again, but in the available classes only "block--map" and "block--gmap" are listed.

Steps to reproduce

See above.

๐Ÿ› Bug report
Status

Active

Version

2.0

Component

User interface

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany droprocker

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States Chris Matthews
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia anchal_gupta

    Hi,
    I have tested this issue according to the given description but that problem is not reproduced in my system.
    The class Autocomplete widget is working fine and I also test ids and attributes it's also working Fine.
    Could you please provide more detail? It would be helpful.

    I am testing this issue in the Drupal 10.1 version

    Testing Steps:
    1. Install the Block class module.
    2. Go to Administration ยป Structure ยป Block Layout.
    3. I add a new class "block--images" to block 1 and attach the screenshot.

    4. then I add another class "block--map" and "block--gmap" in block 2 the list of the available classes is not empty.


    5. Then I go to the block3 configuration the list of the available class have shown all the classes then I add the "block--images" and save.

  • First commit to issue fork.
  • @pooja_sharma opened merge request.
  • Status changed to Needs review over 1 year ago
  • Added changes in MR 21. Please Review.

    Attached Screenshots for reference

    Issue replicate when exact existing class name type/paste, which should not occur as per User experience, it creates kind of confusion that this class not exist.

    I tried to check in core default link field or any other field which is searchable & if you try to paste/type exact "string" then still that string visible in the list

  • Status changed to RTBC 9 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly kopeboy Milan

    I noticed on a fresh Drupal 10.3.1 install just to test this module that searching for an existing class would not show it in the autocomplete ๐Ÿ˜…

    Like say I created class1 and class2, then while typing class in the autocomplete I would see both class1 and class2, but as soon as I also type the 1 in class1, class1 would disappear from the selection list ๐Ÿคจ Weird.

    Fortunately I applied MR!21 as a patch (even to the 2.0.11 version) and it solved the issue. Thanks!

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly kopeboy Milan

    FYI I noticed that the latest version of this module (v4, now stable) doesn't have this issue.

Production build 0.71.5 2024