longlostnick / bootstrap-growl

Pretty simple jQuery plugin that turns standard Bootstrap alerts into "Growl-like" notifications.
http://ifightcrime.github.io/bootstrap-growl
MIT License
806 stars 207 forks source link

Added fix for anything that uses hash based url router #41

Closed jhicken closed 10 years ago

jhicken commented 10 years ago

If your using backbone / angular / ember etc... when you click the dismiss button the href="#" in the dismiss sends you to an unexpected route. This fixes that.

longlostnick commented 10 years ago

Wait shouldn't this work fine either way? Bootstrap should prevent click on the close button before it even changes the url at all. I use this in backbone and have never had a problem.

jhicken commented 10 years ago

I apologize I made an assumption I probably shouldn't have. (backbone / ember) This was specifically to fix angular. Due to the way all the bindings and bubbling happen. The prevent default never happens. I guess I could find a js method to fix this only with angular but this was the simple fix.

longlostnick commented 10 years ago

No worries. I don't see any problem with the change, I was just curious. I'm always used to putting the href="#" in there although I don't think it's even required anymore in html5 spec.