Navigation: Click handler correctly handles absolute URL with hash

Fixes gh-5759