I'm using a gesso-based theme with Layout Builder. When I try to create or edit a custom block that uses an image from the media library, the checkboxes to select an image can't be seen.
Here's the markup:
<div class="views-field views-field-media-library-select-form js-click-to-select-checkbox"><span class="field-content">
<div class="form-item form-item--checkbox form-item--id-media-library-select-form-0 js-form-item js-form-type-checkbox js-form-item-media-library-select-form-0 has-no-label">
<label for="edit-media-library-select-form-0--94vaNsPW6fQ" class="form-item__label visually-hidden">
Select Merlot jelly with brie and blackberry tarts
</label>
<input data-drupal-selector="edit-media-library-select-form-0" type="checkbox" id="edit-media-library-select-form-0--94vaNsPW6fQ" name="media_library_select_form[0]" value="10" class="form-item__checkbox">
</div>
</span></div>
I suspect the problem is that the label is before the checkbox, where the code in _form.item--checkbox.scss seems to expect the checkbox to come first. Instead of expecting a particular order, could the code rely on being a child of .form-item--checkbox instead?
Comments
Comment #2
clafferty commentedComment #3
clafferty commentedComment #4
clafferty commentedComment #5
clafferty commentedThank you for pointing this out. The issue is fixed in release 8.x-3.3.
Comment #6
clafferty commentedComment #7
mandclu commentedThe challenge is that since the recommended way to use gesso is not to make a submodule, I can't really update an existing theme by upgrading. Is this what I need to update?
https://git.drupalcode.org/project/gesso/-/commit/7008d672e5b899aa3d54ed...
Comment #8
clafferty commentedYep! It's a little easier to read if you hit 'hide whitespace changes'.
Just make those changes or copy those 3 files from the repo over yours (if you haven't changed them).
Or I've attached patch I created from that same Gitlab commit page that should do the same thing.