No Code Attached Yet
avatar Bakual
Bakual
13 Jan 2022

Steps to reproduce the issue

  • Create/Edit eg the site module "Articles - Related"
  • Click the link "Show full description ..."
    image

Expected result

The "Description" tab should activate

Actual result

Nothing happens.
Dev Console shows an error:
image

System information (as much as possible)

Tested on 4.1-dev nightly from today (2022-01-13)

Additional comments

The JavaScript looks for the tab with the ID tab-description (document.querySelector('#tab-description').click();), but the tab has no ID at all.
So either the JavaScript needs to be fixed to activate the tab correctly or the tab needs an ID.

avatar Bakual Bakual - open - 13 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Jan 2022
avatar Bakual Bakual - change - 13 Jan 2022
The description was changed
avatar Bakual Bakual - edited - 13 Jan 2022
avatar dgrammatiko
dgrammatiko - comment - 13 Jan 2022
document.getElementById('myTab').activateTab(1); // 1 is the second tab, array based

// OR

document.getElementById('myTab').activateTab(document.getElementById('description'))

// The activateTab accepts an event, HTMLElement (the tab's content element) or an integer as the index of the array of the tabs. Pick your poison...
avatar Bakual
Bakual - comment - 13 Jan 2022

I'm not sure if we can be certain that the "Description" is always the second tab. So the first variant sounds a bit to fragil to me. And the second variant needs an ID on the tab, which doesn't exist ?

avatar dgrammatiko
dgrammatiko - comment - 13 Jan 2022

Both are working, I've tested them because I don't know all the methods off the top of my head...
The tab content for the description has an ID description

avatar Bakual
Bakual - comment - 14 Jan 2022

Ah, then please can you do the PR? Thanks.

avatar dgrammatiko
dgrammatiko - comment - 14 Jan 2022
avatar alikon alikon - close - 14 Jan 2022
avatar alikon
alikon - comment - 14 Jan 2022

closing as we have a pr #36683

avatar alikon alikon - change - 14 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-14 11:30:10
Closed_By alikon

Add a Comment

Login with GitHub to post a comment