Title: ui-sortable + ng-repeat has flaky behavior on drag & drop · Issue #29 · angular-ui/ui-sortable · GitHub
Open Graph Title: ui-sortable + ng-repeat has flaky behavior on drag & drop · Issue #29 · angular-ui/ui-sortable
X Title: ui-sortable + ng-repeat has flaky behavior on drag & drop · Issue #29 · angular-ui/ui-sortable
Description: When you use ui-sortable with ng-repeat it does not work properly on drag & drop. The reason for this is that the call to element.sortable(opts); in the bottom of the link-function is triggered BEFORE the elements have rendered as html (...
Open Graph Description: When you use ui-sortable with ng-repeat it does not work properly on drag & drop. The reason for this is that the call to element.sortable(opts); in the bottom of the link-function is triggered BEF...
X Description: When you use ui-sortable with ng-repeat it does not work properly on drag & drop. The reason for this is that the call to element.sortable(opts); in the bottom of the link-function is triggered...
Opengraph URL: https://github.com/angular-ui/ui-sortable/issues/29
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ui-sortable + ng-repeat has flaky behavior on drag \u0026 drop","articleBody":"When you use ui-sortable with ng-repeat it does not work properly on drag \u0026 drop. The reason for this is that the call to element.sortable(opts); in the bottom of the link-function is triggered BEFORE the elements have rendered as html (this can easily be shown by adding an alert('link') right before or after the call. At that point you can see that the elements from ng-repeat are not there. If you wrap this call in a timeout of 100 (maybe less, but I'll stick to 100) it works, because then the elements are actually on the page. \n\nthe following is a demonstration of a sortable List that has actual written html (top) and one that is generated through ng-repeat (bottom). \n\nhttp://codepen.io/anon/pen/hrwbq\n\nAs mentionened above, the fix for this bug would be to implement a timeout when initializing sortable. Also, you will have to put the top part (the whole part of if (ngModel)) in an init function, otherwise they will not work properly. \n\n$timeout(function () {\n initSortable();\n element.sortable(opts);\n }, 100);\n","author":{"url":"https://github.com/dularion","@type":"Person","name":"dularion"},"datePublished":"2013-08-09T14:10:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":21},"url":"https://github.com/29/ui-sortable/issues/29"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:012a6cb5-04d8-0ca0-5367-463b10f1ff15 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADC0:3FD786:20F342D:2BE7C8A:6A5D6EB8 |
| html-safe-nonce | a54f2f9117ef7aa50f96519df39d715c4d210873a9e186a762408691ea84b2c0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREMwOjNGRDc4NjoyMEYzNDJEOjJCRTdDOEE6NkE1RDZFQjgiLCJ2aXNpdG9yX2lkIjoiMjQ0NDI2MzIzNTY0ODMxOTE2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e6cb2656c05fb97316bbd250a851be7bff392b6d51c7237af7fe1205ea569723 |
| hovercard-subject-tag | issue:17864568 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular-ui/ui-sortable/29/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fb2ea71147d03366b1af109f751c9f4fcdd84782a43bc04bed3fa70b378a20b3/angular-ui/ui-sortable/issues/29 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fb2ea71147d03366b1af109f751c9f4fcdd84782a43bc04bed3fa70b378a20b3/angular-ui/ui-sortable/issues/29 |
| og:image:alt | When you use ui-sortable with ng-repeat it does not work properly on drag & drop. The reason for this is that the call to element.sortable(opts); in the bottom of the link-function is triggered BEF... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dularion |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/angular-ui/ui-sortable git https://github.com/angular-ui/ui-sortable.git |
| octolytics-dimension-user_id | 1530011 |
| octolytics-dimension-user_login | angular-ui |
| octolytics-dimension-repository_id | 8419846 |
| octolytics-dimension-repository_nwo | angular-ui/ui-sortable |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8419846 |
| octolytics-dimension-repository_network_root_nwo | angular-ui/ui-sortable |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width