larrymyers / react-mini-router

A minimal URL router for React.js
MIT License
282 stars 38 forks source link

Conflict with react-bootstrap #42

Closed kkarimi closed 8 years ago

kkarimi commented 8 years ago

It seems that there is a weird conflict between react-mini-router and the popuar react-bootstrap, for the full problem please see here.

To replicate the problem you can go to here (source). Pressing the dropdown when you are on the about page, the app navigates back to home.

I have tried to debug the RouterMixin but with little success. Do you have any ideas? Thanks

kkarimi commented 8 years ago

So with a quick hack I have modified the handeClick like this and it fixes the problem temporarily..

handleClick: function(evt) {
    var dropdownevt = (evt.path[0].id === 'acc-dropdown');
    if (url && self.matchRoute(url.pathname) && !dropdownevt) {    ...
molson504x commented 8 years ago

@kkarimi Have you tried creating the dropdown button without using an anchor tag? Or without putting the href attribute in your anchor tag?