https://git.koha-community.org/Koha-community/Koha/src/commit/1ea4a11c2a88f7b23b482e071db48ae235beb42b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss#L240 sets the height of aside fieldset select to a calculated "one fat line" which is fine for <select>, but for <select multiple> and <select size="10"> it turns what should be a multiline box into one line with a nearly invisible scrollbar. The fix is simple, a rule (like the one that exists in bootstrap.scss, which isn't specific enough to overrule the aside fieldset select rule) right after that for select[multiple], select[size] { height: auto; } but I don't quite know how to formulate a test plan for something unused other than by the advanced cataloging editor, which is working around the problem in bug 36589.
Created attachment 166916 [details] [review] Bug 36897: Make it possible to use select[multiple] and select[size] in a sidebar Currently, if you put either <select multiple> or <select size="10"> in an <aside><fieldset> sidebar, you get a height of "one fat line" rather than the bigger box you would expect. Test plan: 1. Without the patch, load Reports - Use saved 2. Open Firefox developer tools to the Inspector tab 3. With the "Pick an element from the page" tool, click on the word "Filter" in the Reports page's sidebar 4. Just above that line in the HTML display is a <fieldset class="brief"> - right click that and choose Edit As HTML 5. After the fieldset element, paste <select multiple><option>one</option><option>two</option></select><select size="10"></select> 6. Click outside the editor to save your changes 7. Note that both new selects are only one line high 8. Apply patch, run yarn build, Shift+reload to clear your cache 9. Repeat steps 3 through 6 10. Note that both selects are more than one line high
I use devtools to edit CSS all the time, but apparently I either never noticed it had an HTML editor, or forgot about it.
Created attachment 166937 [details] [review] Bug 36897: Make it possible to use select[multiple] and select[size] in a sidebar Currently, if you put either <select multiple> or <select size="10"> in an <aside><fieldset> sidebar, you get a height of "one fat line" rather than the bigger box you would expect. Test plan: 1. Without the patch, load Reports - Use saved 2. Open Firefox developer tools to the Inspector tab 3. With the "Pick an element from the page" tool, click on the word "Filter" in the Reports page's sidebar 4. Just above that line in the HTML display is a <fieldset class="brief"> - right click that and choose Edit As HTML 5. After the fieldset element, paste <select multiple><option>one</option><option>two</option></select><select size="10"></select> 6. Click outside the editor to save your changes 7. Note that both new selects are only one line high 8. Apply patch, run yarn build, Shift+reload to clear your cache 9. Repeat steps 3 through 6 10. Note that both selects are more than one line high Signed-off-by: Owen Leonard <oleonard@myacpl.org>
> but I don't quite know how to formulate a test plan for something unused > other than by the advanced cataloging editor, which is working around the > problem in bug 36589. If this is unused why do we need related CSS in Koha?
Because our existing CSS is wrong, and we don't want the next person who puts a multiple or sized <select> in a sidebar to have to figure out how it is wrong, and how to work around it being wrong. What the selector above the one added by this patch really meant was "select:not(multiple size)" (untested, I don't use :not() often), but since :not() is tricksy and expensive, it makes more sense to fix the wrongness by just adding a second selector to undo it when it shouldn't apply.
Given that bug 36589 has made it to oldstable, and doesn't much look like it's going any further, I could add in reverting the patch for it, if that helps make this more attractive.
Created attachment 172375 [details] [review] Bug 36897: Make it possible to use select[multiple] and select[size] in a sidebar Currently, if you put either <select multiple> or <select size="10"> in an <aside><fieldset> sidebar, you get a height of "one fat line" rather than the bigger box you would expect. Test plan: 1. Without the patch, load Reports - Use saved 2. Open Firefox developer tools to the Inspector tab 3. With the "Pick an element from the page" tool, click on the word "Filter" in the Reports page's sidebar 4. Just above that line in the HTML display is a <fieldset class="brief"> - right click that and choose Edit As HTML 5. After the fieldset element, paste <select multiple><option>one</option><option>two</option></select><select size="10"></select> 6. Click outside the editor to save your changes 7. Note that both new selects are only one line high 8. Apply patch, run yarn build, Shift+reload to clear your cache 9. Repeat steps 3 through 6 10. Note that both selects are more than one line high 11. Set the preference EnableAdvancedCatalogingEditor to Enable 12. Cataloging - Advanced editor 13. In the left sidebar, verify that the Clipboard is still 10 lines high, not one fat line like it was before bug 36589 Sponsored-by: Chetco Community Public Library
Created attachment 172376 [details] [review] Bug 36897: Make it possible to use select[multiple] and select[size] in a sidebar Currently, if you put either <select multiple> or <select size="10"> in an <aside><fieldset> sidebar, you get a height of "one fat line" rather than the bigger box you would expect. Test plan: 1. Without the patch, load Reports - Use saved 2. Open Firefox developer tools to the Inspector tab 3. With the "Pick an element from the page" tool, click on the word "Filter" in the Reports page's sidebar 4. Just above that line in the HTML display is a <fieldset class="brief"> - right click that and choose Edit As HTML 5. After the fieldset element, paste <select multiple><option>one</option><option>two</option></select><select size="10"></select> 6. Click outside the editor to save your changes 7. Note that both new selects are only one line high 8. Apply patch, run yarn build, Shift+reload to clear your cache 9. Repeat steps 3 through 6 10. Note that both selects are more than one line high 11. Set the preference EnableAdvancedCatalogingEditor to Enable 12. Cataloging - Advanced editor 13. In the left sidebar, verify that the Clipboard is still 10 lines high, not one fat line like it was before bug 36589 Sponsored-by: Chetco Community Public Library