mouse0270 / bootstrap-notify

Turns standard Bootstrap alerts into "Growl-like" notifications.
http://bootstrap-notify.remabledesigns.com/
MIT License
2.25k stars 641 forks source link

dismiss (close) icon isn't correctly positioned if not using url option #92

Closed pgilad closed 9 years ago

mouse0270 commented 9 years ago

Can you provide me with an example of your call to Bootstrap Notify?

pgilad commented 9 years ago

Found the issue... it is caused by this check: https://github.com/mouse0270/bootstrap-notify/blob/master/bootstrap-notify.js#L100-L102

Notice that styleURL also styles the dismiss icon. That code needs to be extracted to it's own function.

mouse0270 commented 9 years ago

What are you passing as a URL? just an empty space? such as ""

mouse0270 commented 9 years ago

I see your point though. I'll look into correcting this on the upcoming weekend.

pgilad commented 9 years ago

It's an easy correction, can I PR?

mouse0270 commented 9 years ago

If you would like. I would really appreciate it.

pgilad commented 9 years ago

Btw a blank string will resolve to a # as well (https://github.com/mouse0270/bootstrap-notify/blob/master/bootstrap-notify.js#L66)

mouse0270 commented 9 years ago

Yeah, I know. It is why I was curious what you were doing to incite the issue. In the months I have released this I have yet to see this issue occur. haha

pgilad commented 9 years ago

Yeah I was going mad as to why in the examples it is (mostly) aligning the dismiss icon, and in our project it doesn't... Had to trace this in :cry:

mouse0270 commented 9 years ago

Haha, gotta love that. I keep wanting to switch to use the actual bootstrap alert-dismissal class but haven't found a solution to the absolute position issue caused by the anchor tag.