Open vpzomtrrfrt opened 5 years ago
@vpzomtrrfrt is this mounted within a <Router>
? If so <a href="/hashtest#relative">
will perform a Router update in addition to the hashchange. If not, it will perform a full page load. I'm not sure which is being used here.
Here's the full test project: https://github.com/vpzomtrrfrt/hashchangetest
On the /hashtest page, the "Relative link" link doesn't trigger the hashchange event
Rewrote test case for current version, issue is still present.
Looks like the working links aren't even being intercepted by preact-router, as it doesn't seem to support links other than root-relative.
yup, that's correct. preact-router
only supports root-relative urls.
Linking with just a fragment will trigger a hashchange event, but it doesn't appear to work if the href also includes the path.
Sample code showing the problem: