diff --git a/libraries/src/HTML/Helpers/Bootstrap.php b/libraries/src/HTML/Helpers/Bootstrap.php
index 17e3dc85b005e..959ae4abc6790 100644
--- a/libraries/src/HTML/Helpers/Bootstrap.php
+++ b/libraries/src/HTML/Helpers/Bootstrap.php
@@ -570,11 +570,11 @@ public static function loadCss($includeMainCss = true, $direction = 'ltr', $attr
*
* @since 3.0
*
- * Options for the tooltip can be:
- * - parent selector If selector then all collapsible elements under the specified parent will be closed when this
- * collapsible item is shown. (similar to traditional accordion behavior)
- * - toggle boolean Toggles the collapsible element on invocation
- * - active string Sets the active slide during load
+ * Options for the tooltip can be:
+ * - parent selector If selector then all collapsible elements under the specified parent will be closed when this
+ * collapsible item is shown. (similar to traditional accordion behavior)
+ * - toggle boolean Toggles the collapsible element on invocation
+ * - active string Sets the active slide during load
*/
public static function startAccordion($selector = '.myAccordian', $options = []) :string
{
@@ -584,6 +584,12 @@ public static function startAccordion($selector = '.myAccordian', $options = [])
return '';
}
+ // For B/C
+ if (substr($selector, 0, 1) !== '.')
+ {
+ $selector = '.' . $selector;
+ }
+
// Include Bootstrap component
Factory::getApplication()
->getDocument()
@@ -632,6 +638,12 @@ public static function endAccordion() :string
*/
public static function addSlide($selector, $text, $id, $class = '') :string
{
+ // For B/C
+ if (substr($selector, 0, 1) !== '.')
+ {
+ $selector = '.' . $selector;
+ }
+
$in = static::$loaded[__CLASS__ . '::startAccordion'][$selector]['active'] === $id ? ' show' : '';
$collapsed = static::$loaded[__CLASS__ . '::startAccordion'][$selector]['active'] === $id ? '' : ' collapsed';
$parent = static::$loaded[__CLASS__ . '::startAccordion'][$selector]['parent'] ?
@@ -699,6 +711,12 @@ public static function renderModal($selector = '.modal', $options = [], $body =
return '';
}
+ // For B/C
+ if (substr($selector, 0, 1) !== '.')
+ {
+ $selector = '.' . $selector;
+ }
+
// Initialise with the Joomla specifics
$options['isJoomla'] = true;
@@ -732,6 +750,12 @@ public static function startTabSet($selector = '.myTab', $params = []) :string
if (!isset(static::$loaded[__METHOD__][$sig]))
{
+ // For B/C
+ if (substr($selector, 0, 1) !== '.')
+ {
+ $selector = '.' . $selector;
+ }
+
// Setup options object
$opt['active'] = (isset($params['active']) && ($params['active'])) ? (string) $params['active'] : '';
@@ -776,6 +800,12 @@ public static function addTab($selector, $id, $title) :string
{
static $tabLayout = null;
+ // For B/C
+ if (substr($selector, 0, 1) !== '.')
+ {
+ $selector = '.' . $selector;
+ }
+
$tabLayout = $tabLayout === null ? new FileLayout('libraries.html.bootstrap.tab.addtab') : $tabLayout;
$active = (static::$loaded[__CLASS__ . '::startTabSet'][$selector]['active'] == $id) ? ' active' : '';