New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Remove duplicate class="custom-select" #20196
Conversation
your pr works - i just wonder if it is correct to remove the one in the library |
If w don't do that then we're forcing the bootstrap class everywhere which is totally wrong |
Technically the library helpers shouldn't be framework coupled (even if it is a very generic utility class) unless the helper is a framework oriented one (i.e. |
True, and also this gets a bit messy if we consider that these fields get their data from an XML file which is hard to override |
the reason for me asking was so because i saw other instances of custom-select-* in the libraries and it seems odd to remove one and not the other and smells of an issue elsewhere in the codebase if it is duplicating for this instance but not for others |
Maybe the middle ground will be a joomla-select class (for the core templates will just extend the bootstrap custom-select). |
I'm not really sure that will help. You go from the field been coupled with bootstrap to been coupled with a block of css. At a basic level we would be asking people to load both bootstrap and this Joomla css (previously 'chosen'). Not that that is a problem but it creates another middle of the road approach. This time between bootstrap and a joomla css framework. |
Well my idea here was about consistency, eg all select elements have this class. What you do with that class is down to the t mplate developer |
I have tested this item ✅ successfully on a9e87cb This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20196. |
x-link comment from duplicate PR: #21147 (comment) |
I have tested this item ✅ successfully on a9e87cb The hard coded class attribute is not added for select.list, but only for select.groupedlist, such hard coding does not exist in J3 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20196. |
Ready to Commit after two successful tests. |
Good catch, thanks for the fix and the tests. |
Summary of Changes
Remove duplicate
class="custom-select"
.Testing Instructions
Go to Menus > Main Menu
View page source
Search for
<select id="menutype"
class="custom-select"
listed twice.Expected result
<select id="menutype" name="menutype" class="custom-select" onchange="this.form.submit();">
Actual result
<select id="menutype" name="menutype" class="custom-select" onchange="this.form.submit();" class="custom-select">