{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/2003","labels_url":"https://api.github.com/repos/meteor/meteor/issues/2003/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/2003/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/2003/events","html_url":"https://github.com/meteor/meteor/issues/2003","id":30740697,"number":2003,"title":"Trouble using jQuery UI sortable with an array within a Mongo document","user":{"login":"JackAdams","id":1647779,"avatar_url":"https://avatars.githubusercontent.com/u/1647779?v=3","gravatar_id":"","url":"https://api.github.com/users/JackAdams","html_url":"https://github.com/JackAdams","followers_url":"https://api.github.com/users/JackAdams/followers","following_url":"https://api.github.com/users/JackAdams/following{/other_user}","gists_url":"https://api.github.com/users/JackAdams/gists{/gist_id}","starred_url":"https://api.github.com/users/JackAdams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackAdams/subscriptions","organizations_url":"https://api.github.com/users/JackAdams/orgs","repos_url":"https://api.github.com/users/JackAdams/repos","events_url":"https://api.github.com/users/JackAdams/events{/privacy}","received_events_url":"https://api.github.com/users/JackAdams/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/confirmed","name":"confirmed","color":"e10c02"},{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Blaze","name":"Project:Blaze","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2014-04-03T01:41:31Z","updated_at":"2015-05-11T01:25:57Z","closed_at":null,"body":"I've got a feeling this might be expected behaviour in Blaze, given how things are indexed using the {{#each}} block helper, but this is something that used to work in Spark.  Repo showing the problem is here: https://github.com/JackAdams/blaze-issue and the example app is deployed here: http://blaze-issue-example-app.meteor.com/"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/100731514","html_url":"https://github.com/meteor/meteor/issues/2003#issuecomment-100731514","issue_url":"https://api.github.com/repos/meteor/meteor/issues/2003","id":100731514,"user":{"login":"skosch","id":554383,"avatar_url":"https://avatars.githubusercontent.com/u/554383?v=3","gravatar_id":"","url":"https://api.github.com/users/skosch","html_url":"https://github.com/skosch","followers_url":"https://api.github.com/users/skosch/followers","following_url":"https://api.github.com/users/skosch/following{/other_user}","gists_url":"https://api.github.com/users/skosch/gists{/gist_id}","starred_url":"https://api.github.com/users/skosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skosch/subscriptions","organizations_url":"https://api.github.com/users/skosch/orgs","repos_url":"https://api.github.com/users/skosch/repos","events_url":"https://api.github.com/users/skosch/events{/privacy}","received_events_url":"https://api.github.com/users/skosch/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T01:25:57Z","updated_at":"2015-05-11T01:25:57Z","body":"Oh, really? Maybe it's just me then. (Not being sarcastic—thanks for the fast reply!)\r\n\r\nI have a custom drag-and-drop setup (not a sortable, because the mechanics are somewhat, um, special). Initially, it's a bunch of `<div>`s with `data-index={{index}}` attributes that are rendered (via `{{#each}}`) based on a helper that returns some array A from a collection. They all show up in the correct order.\r\n\r\nThen I drag and drop, which involves appending the elements to `<body>` and later reappending them to their original parent. This changes the `data-index` attributes and the new order is written to a temporary array B. So far, so good. When I now update array A using said temporary array B (instead of resetting the form and discarding B), the changes are successfully written to the collection and the helper is called again, but the `<div>`s and their `data-index` attributes are suddenly all wrong and end up in the wrong place. Reloading the page (and thus re-creating the DOM) fixes the problem.\r\n\r\nI can post code if my explanation isn't clear. I'm running the latest version of Meteor."}}