Bugfix. Detach the element before positioning it again.
Otherwise the index of the element relative to which we place it changes depending on whether the element being positioned is placed before or after it.
This commit is contained in:
parent
bf837a921e
commit
9bda651137
@ -3275,6 +3275,7 @@
|
|||||||
*/
|
*/
|
||||||
var view = this.get(contact.get('id'));
|
var view = this.get(contact.get('id'));
|
||||||
var index = this.model.contacts.indexOf(contact);
|
var index = this.model.contacts.indexOf(contact);
|
||||||
|
view.$el.detach();
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
this.$el.after(view.$el);
|
this.$el.after(view.$el);
|
||||||
} else if (index == (this.model.contacts.length-1)) {
|
} else if (index == (this.model.contacts.length-1)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user