?
avatar bembelimen
bembelimen
8 May 2021

Steps to reproduce the issue

<?php

$title = '<img src="...">';

echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'active-1']);
    echo HTMLHelper::_('uitab.addTab', 'myTab', 'active-1', $title);
        echo 'Test1';
    echo HTMLHelper::_('uitab.endTab');
    echo HTMLHelper::_('uitab.addTab', 'myTab', 'active-2', $title);
        echo 'Test2';
    echo HTMLHelper::_('uitab.endTab');
echo HTMLHelper::_('uitab.endTabSet');

?>

Expected result

Clicking on the image changes the tab.

Actual result

Uncaught TypeError: e.target.hash is undefined (joomla-tab.js:233:32)

Additional comments

Solution: joomla-projects/custom-elements#164

@dgrammatiko

avatar bembelimen bembelimen - open - 8 May 2021
avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 May 2021
avatar bembelimen bembelimen - change - 8 May 2021
The description was changed
avatar bembelimen bembelimen - edited - 8 May 2021
avatar dgrammatiko
dgrammatiko - comment - 8 May 2021

There are way more serious problems with tabs and alerts, hopefully #33234 will sort things out

FWIW the title should be expected ALWAYS to be text, not HTML. If you need to add icons, CSS is extremely viable

avatar bembelimen
bembelimen - comment - 9 May 2021

Hi @dgrammatiko , thanks for your answer. I needed flexible images, defined by the user in the article. So I think it's not unlikely to have sometimes HTML there.

avatar bembelimen bembelimen - change - 5 Jul 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-07-05 17:29:20
Closed_By bembelimen
avatar bembelimen bembelimen - close - 5 Jul 2021

Add a Comment

Login with GitHub to post a comment