bigskysoftware / bigskysoftware/htmx
shouldCancel anchor handling incorrect
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
https://github.com/bigskysoftware/htmx/blob/407408b94708705d67812ccc8b1d436287cab785/src/htmx.js#L2408
The check `elt.getAttribute('href').indexOf("#") !== 0` here produces unexpected behavior.
Specifically, I would expect to be able to click a link and have it both fire an htmx request and navigate as normal. However the above check results in prevented navigation given any href without a hash as the first symbol. Not at all what I would anticipate.
I have asked about this previously. https://discord.com/channels/725789699527933952/1284935051829837854
Having long since removed this line from my own copies of htmx and experienced no ill consequences, I propose it be removed generally. Is there some circumstance I am not seeing in which it is necessary?
Contributor guide
Assessment
This issue has not been assessed yet.