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

alert move weirdly if updated

Open esgi-dendyanri opened this issue 7 years ago • 2 comments

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.

esgi-dendyanri avatar Nov 10 '17 07:11 esgi-dendyanri

any help about this issue , i'm getting the notification keeps moving ?

MarwaAbuEssa avatar Apr 16 '20 12:04 MarwaAbuEssa

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.

esgi-dendyanri avatar Apr 22 '20 09:04 esgi-dendyanri