You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When rendering RadioButtonGroup with model that already has one of the valid options selected, ActiveField.php renders the label with 'active' CSS class added, which does not seem to be needed with BootStrap 5.x.
The result is that, whatever other option you select, the initially selected one still stays visually selected.
The fix is simple (attached .diff), but I'm not sure it does not break any other behaviour (so far haven't found any issues). fix-activeform.diff.txt
--- ActiveField.php 2023-09-23 23:00:37.981027706 +0300
+++ ActiveField.php 2023-09-23 22:59:31.389222800 +0300
@@ -1833,7 +1833,7 @@
$wrapperOptions = ['class' => [$type.$css]];
}
if ($asBtnGrp) {
- if ($checked) {
+ if (($checked) and (!$isBs5)) {
Html::addCssClass($labelOpts, 'active');
}
$opts['autocomplete'] = 'off';
When rendering RadioButtonGroup with model that already has one of the valid options selected, ActiveField.php renders the label with 'active' CSS class added, which does not seem to be needed with BootStrap 5.x.
The result is that, whatever other option you select, the initially selected one still stays visually selected.
The fix is simple (attached .diff), but I'm not sure it does not break any other behaviour (so far haven't found any issues).
fix-activeform.diff.txt
Sample code which shows the issue:
The text was updated successfully, but these errors were encountered: