milosjanda / react-scroll-up

React component to add custom buttons for scrolling to top of page
MIT License
175 stars 28 forks source link

Prevent default on click #18

Closed sousousore1 closed 7 years ago

sousousore1 commented 7 years ago

Hi

I'm using FloatingActionButton of material-ui into ScrollToTop component as child component. FloatingActionButton needs to set a href attribute. If I don't set It become gray color at default. However I set # to a href attribute then becomes strange animation. It only move to top animation so I would like to stop default event propagation of ScrollToTop.

milosjanda commented 7 years ago

Could you fix the test? And rewrite to actual version.

sousousore1 commented 7 years ago

Thank you for a reply. I found another solution that is to set 'javascript:void(0)' as component href attribute. So, I want to withdraw this issue.

milosjanda commented 7 years ago

Perfect, good to known. Thank you.