A way to link to elements in the current page
sgrove opened this issue · comments
Related to #2, would it be possible to have an attribute in target
that causes pushy to ignore the event? Semantically, target="_self"
makes sense (and is used for e.g. Precursor).
My use case is that I have a long form with a ToC in a sidebar. I want the links in the ToC to link to parts of the page using the id hash (just standard html stuff), but pushy is intercepting the click and disables it (since it otherwise qualifies for a pushy event)
https://github.com/kibu-australia/pushy/blob/master/src/pushy/core.cljs#L118
Could be changed from:
(not (= "_blank" (.getAttribute el "target")))
to
(not (get #{"_blank" "_self"} (.getAttribute el "target")))
Thanks for Pushy by the way, it's really fantastic!
Thanks. Fixed in 0.3.5