Skip to content

[4.0] Joomla Help Index Page #33722

@ceford

Description

@ceford

Steps to reproduce the issue

Go to Administrator / Help / Start Here - Joomla! Help
Scroll down to near the bottom of the long list and click an item there

Expected result

Something should happen

Actual result

Nothing appears to happen because the Iframe with the new help page has been loaded out of sight.

System information (as much as possible)

Additional comments

I previously had a fix committed for this issue using a scrolling div for the index. The css for this has been removed in the recent round of template clean up. I now have a different solution using scroll to top on selecting any help item. For my testing I have put this in the com_admin/tmpl/help/default.php like so:

$wa = $this->document->getWebAssetManager();
$content = "
document.addEventListener('DOMContentLoaded', function(event) {
	let helpIndex = document.getElementById('help-index');
	let links = helpIndex.querySelectorAll('a');
	links && links.forEach(element => {
		element.addEventListener('click', event => {
			window.scroll(0,0);
		});
	})
});
";
$wa->addInlineScript($content);

Is that best, or should it be in one of the Javascript files?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions