bootstrap-notify
bootstrap-notify copied to clipboard
alert move weirdly if updated
Hi @mouse0270
Great job with the plugin, i really love it.
But i found an issue while update an alert,
you can reproduce it by doing this:
b = $.notify({message: '2'}, {type: 'success', allow_dismiss: false, delay: 0});
c = $.notify({message: '3'}, {type: 'success', allow_dismiss: false, delay: 0});
// then this
b.update({message: '2'}); // the "c" move in front of "b"
// wait a second then this
a.update({message: '1'}); // the "c" move into "c" place again
i found the cause in line 186-187 in version 3.1.5
var posX = this.$ele.outerHeight() + parseInt(self.settings.spacing) + parseInt(self.settings.offset.y);
self.reposition(posX);
why do we need repostion when i'm just doing update on the message anyway,
i comment it and it's not problem anymore, i just want to let you know for feature improvement,
Thanks again for this amazing plugin.
any help about this issue , i'm getting the notification keeps moving ?
Hi @MarwaAbuEssa
Just open bootstrap-notify.js
and comment line 186-187.
the code look like this:
var posX = this.$ele.outerHeight() + parseInt(self.settings.spacing) + parseInt(self.settings.offset.y);
self.reposition(posX);
i don't see any problem doing that.