aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/resources/dokka
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/resources/dokka')
-rw-r--r--plugins/base/src/main/resources/dokka/scripts/platformContentHandler.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/base/src/main/resources/dokka/scripts/platformContentHandler.js b/plugins/base/src/main/resources/dokka/scripts/platformContentHandler.js
index 6f10b08a..f0e08f48 100644
--- a/plugins/base/src/main/resources/dokka/scripts/platformContentHandler.js
+++ b/plugins/base/src/main/resources/dokka/scripts/platformContentHandler.js
@@ -17,6 +17,10 @@ window.addEventListener('load', () => {
handleAnchor()
})
+// Hash change is needed in order to allow for linking inside the same page with anchors
+// If this is not present user is forced to refresh the site in order to use an anchor
+window.onhashchange = handleAnchor
+
function handleAnchor() {
let searchForTab = function(element) {
if(element && element.hasAttribute) {