Closed edvorg closed 8 years ago
FWIW, this breaks the middle-click and the ctrl-click (open in a new tab).
Ahh. Didn't know that. May be author have workaround @venantius
But does it really matter for reagent applications?
Well yes...
If you use Reagent to create something for the browser, you absolutely don't want to break normal browser behavior.
I found the solution and will make a pr to accountant soon. https://developer.mozilla.org/en/docs/Web/Events/click But what do you think about this idea in general?
I have no strong opinion about it. I guess @yogthos is in a better position to comment on this.
Personally I use Bidi in my projects.
fixed in accountant
https://github.com/venantius/accountant/pull/9
@edvorg I agree with @Frozenlock that breaking default browser behavior as the default wouldn't be desirable, but since it looks like that issue has been fixed the pr looks good to me
I'd wait once the change is merged, and then could release against the latest version of accountant
I've merged the change to Accountant and pushed up a new version, 0.1.4, that includes it.
:+1:
and up on Clojars
This idiomatic change suggest to use accountant library for client-side rounting configuration. The main idea is to use non-fragment hrefs and handle clicks via dom events. If browser is capable enough and routes for href path is present, page will not cause reloading.
You may see an example at http://isomorph.clj.rocks . No matter, which browser you use - firefox, chrome or links. It will be routed correctly.
Changes summary: