Navigation: Click handler correctly handles absolute URL with hash

Closes gh-7632
Fixes gh-5759