From 8344c3b6360b09e99b32c8c5f34f28d3310f9e1a Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Thu, 8 Nov 2018 18:49:57 -0800 Subject: Clicking on "Contents" navigates to top of page --- haddock-api/src/Haddock/Backends/Xhtml.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'haddock-api/src/Haddock/Backends/Xhtml.hs') diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs index e2fdc509..202fcdf1 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml.hs @@ -634,7 +634,7 @@ ppModuleContents pkg qual exports orphan | otherwise = contentsDiv where contentsDiv = divTableOfContents << (divContentsList << ( - sectionName << "Contents" +++ + (sectionName << "Contents") ! [ strAttr "onclick" "window.scrollTo(0,0)" ] +++ unordList (sections ++ orphanSection))) (sections, _leftovers{-should be []-}) = process 0 exports -- cgit v1.2.3