Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/core/router/history/hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ export class HashHistory extends History {
const el = e.target.tagName === 'A' ? e.target : e.target.parentNode;

if (el && el.tagName === 'A' && !/_blank/.test(el.target)) {
navigating = true;
// When click the same naigator in sidebar, it won't trigger the hashchange event, even though the content already scroll down and active other anchor.
// In this scenario, we do the navigating thing via the click event.
if (el.hash && el.hash === window.location.hash) {
const source = 'navigate';
cb({ event: e, source });
} else {
navigating = true;
}
}
});

Expand Down