aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-11-08 18:49:57 -0800
committerAlec Theriault <alec.theriault@gmail.com>2018-11-08 19:44:12 -0800
commit8344c3b6360b09e99b32c8c5f34f28d3310f9e1a (patch)
treed50de6934ededa86196caf15d88bd15104d76d59 /haddock-api/src/Haddock/Backends/Xhtml.hs
parent4a5648b24e007a2c5aad023ab1bf113be9866b1d (diff)
Clicking on "Contents" navigates to top of page
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs2
1 files changed, 1 insertions, 1 deletions
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