bootstrap-notify icon indicating copy to clipboard operation
bootstrap-notify copied to clipboard

Bug in Offset Amount Adjustment

Open ThomasSchellenbergNextCentury opened this issue 10 years ago • 1 comments

The offset amount adjustment caused by the existence of multiple notifications with the same placement (https://github.com/mouse0270/bootstrap-notify/blob/master/bootstrap-notify.js#L195) does not take into account the element inside which the notification is placed.

For example, I have two sibling elements, A and B, and element A contains a notification in its top-right. If I create a notification in the top-right of element B, its offset will be adjusted due to the top-right notification in element A.

You can solve this issue on line 195 by searching for notifications with matching placement among the immediate children of this.settings.element instead of among the whole document.

Thanks,

Thomas Schellenberg

Good catch. I am surprised no one has mentioned this yet. haha

I'll take a look at it this weekend.

mouse0270 avatar Mar 10 '15 14:03 mouse0270