diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2018-11-08 18:49:57 -0800 |
---|---|---|
committer | Alec Theriault <alec.theriault@gmail.com> | 2018-11-08 19:44:12 -0800 |
commit | 8344c3b6360b09e99b32c8c5f34f28d3310f9e1a (patch) | |
tree | d50de6934ededa86196caf15d88bd15104d76d59 | |
parent | 4a5648b24e007a2c5aad023ab1bf113be9866b1d (diff) |
Clicking on "Contents" navigates to top of page
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml.hs | 2 | ||||
-rw-r--r-- | html-test/ref/Bug387.html | 2 | ||||
-rw-r--r-- | html-test/ref/BugExportHeadings.html | 2 | ||||
-rw-r--r-- | html-test/ref/DeprecatedReExport.html | 2 | ||||
-rw-r--r-- | html-test/ref/Hash.html | 2 | ||||
-rw-r--r-- | html-test/ref/OrphanInstances.html | 2 | ||||
-rw-r--r-- | html-test/ref/Test.html | 2 |
7 files changed, 7 insertions, 7 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 diff --git a/html-test/ref/Bug387.html b/html-test/ref/Bug387.html index a6b19759..3193fc7f 100644 --- a/html-test/ref/Bug387.html +++ b/html-test/ref/Bug387.html @@ -42,7 +42,7 @@ ></div ><div id="table-of-contents" ><div id="contents-list" - ><p class="caption" + ><p class="caption" onclick="window.scrollTo(0,0)" >Contents</p ><ul ><li diff --git a/html-test/ref/BugExportHeadings.html b/html-test/ref/BugExportHeadings.html index 19f19778..16a87d65 100644 --- a/html-test/ref/BugExportHeadings.html +++ b/html-test/ref/BugExportHeadings.html @@ -42,7 +42,7 @@ ></div ><div id="table-of-contents" ><div id="contents-list" - ><p class="caption" + ><p class="caption" onclick="window.scrollTo(0,0)" >Contents</p ><ul ><li diff --git a/html-test/ref/DeprecatedReExport.html b/html-test/ref/DeprecatedReExport.html index a2c9b4f2..8f1a6a4c 100644 --- a/html-test/ref/DeprecatedReExport.html +++ b/html-test/ref/DeprecatedReExport.html @@ -42,7 +42,7 @@ ></div ><div id="table-of-contents" ><div id="contents-list" - ><p class="caption" + ><p class="caption" onclick="window.scrollTo(0,0)" >Contents</p ><ul ><li diff --git a/html-test/ref/Hash.html b/html-test/ref/Hash.html index 69afe1aa..51b031db 100644 --- a/html-test/ref/Hash.html +++ b/html-test/ref/Hash.html @@ -42,7 +42,7 @@ ></div ><div id="table-of-contents" ><div id="contents-list" - ><p class="caption" + ><p class="caption" onclick="window.scrollTo(0,0)" >Contents</p ><ul ><li diff --git a/html-test/ref/OrphanInstances.html b/html-test/ref/OrphanInstances.html index d6cbcf8e..99e553c3 100644 --- a/html-test/ref/OrphanInstances.html +++ b/html-test/ref/OrphanInstances.html @@ -42,7 +42,7 @@ ></div ><div id="table-of-contents" ><div id="contents-list" - ><p class="caption" + ><p class="caption" onclick="window.scrollTo(0,0)" >Contents</p ><ul ><li diff --git a/html-test/ref/Test.html b/html-test/ref/Test.html index b7f93128..88683c58 100644 --- a/html-test/ref/Test.html +++ b/html-test/ref/Test.html @@ -72,7 +72,7 @@ ></div ><div id="table-of-contents" ><div id="contents-list" - ><p class="caption" + ><p class="caption" onclick="window.scrollTo(0,0)" >Contents</p ><ul ><li |