I had this same issue, and it looks like it's due to the jquery.simpler-select.js's selectGetLevel method hooking onto .form-type-cshs. The default templates (like classy) render forms with a prefixed "js" on that form type class like so: .js-form-type-cshs.
There should probably be a patch to this module to solve the issue, but since the maintenance seems like its halted, a quick workaround would be to add a custom form-element.html.twig template to your theme and add 'form-type-' ~ type|clean_class, to the classes array.
It's sad that the modul maintenance is not really on point... because this module is pretty much the only one for drupal 8 with this (really basic) function. It's a shame...
Oh wow! With Claro the first label persists across all combo boxes. 😲 Need to check the other core themes and see whether this could be a Claro-related issue only.
Comments
Comment #2
carwin commentedI had this same issue, and it looks like it's due to the jquery.simpler-select.js's
selectGetLevelmethod hooking onto.form-type-cshs. The default templates (like classy) render forms with a prefixed "js" on that form type class like so:.js-form-type-cshs.There should probably be a patch to this module to solve the issue, but since the maintenance seems like its halted, a quick workaround would be to add a custom
form-element.html.twigtemplate to your theme and add'form-type-' ~ type|clean_class,to the classes array.You can find the default template here.
Comment #3
handkerchief@carwin Thank you very much!
It's sad that the modul maintenance is not really on point... because this module is pretty much the only one for drupal 8 with this (really basic) function. It's a shame...
Comment #4
plousia commentedBit late, but just wanted to say thanks @carwin for this as well...fixed the problem for me.
Comment #5
heavystonehead@ carwin thank you for sharing it... it works
Comment #6
br0kenSeems to be outdated.
Comment #7
andy-blumThis is still an issue in Claro. I've been trying to track down where things are breaking and I haven't found it yet.
Comment #8
br0kenOh wow! With Claro the first label persists across all combo boxes. 😲 Need to check the other core themes and see whether this could be a Claro-related issue only.
Comment #9
br0kenOlivero has the same issue. Bartik is ok though. I bet the issue should be the same for Claro and Olivero.
Comment #10
br0kenClasses on Claro:
Classes on Olivero:
Classes on Bartik:
Classes on Seven:
CSHS's JavaScript logic uses
.form-type-cshsand it does not exist for both Claro and Olivero themes which makes the #3173253: selectGetLevel() fails due to targetting .form-type-cshs not .js-form-type-cshs issue clear.Comment #11
br0kenFixed by #3173253: selectGetLevel() fails due to targetting .form-type-cshs not .js-form-type-cshs.