Given the fix rolled in #1539444 to search for items containing text this is likely made redundant, but we've been frustrated by how Chosen is thrown off by nested/hierarchal taxonomy terms that are prefixed with dashes.

That is search for "Blue" won't match the "-Blue".

Here's a simple update to the module's chosen.js that makes "-blue" "- blue".

Only showing the "$(this).find('option').each(function() {".

          $(this).find('option').each(function() {
		    itemText = $(this).text();
		    itemText = itemText.replace(/-([^-])/i, "- $1");
		    $(this).text(itemText);
		  });
          $(this).chosen();
        }

No patch attached as more than likely this won't be used.

Comments

shadcn’s picture

Status: Active » Fixed

Thanks. This is now fixed in the alpha-3.

Status: Fixed » Closed (fixed)

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