{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/24228355","id":24228355,"diff_hunk":"@@ -212,9 +212,127 @@ test(\"{ containment: 'window' }\", function() {\n \n test(\"{ containment: Selector }\", function() {\n \tok(false, \"missing test - untested code is broken code.\");\n+});*/\n+\n+test(\"#5772: wide element intersect sorting to first and last position on x-axis\", function() {\n+\texpect(2);\n+\n+\tvar element = $(\"#sortable-horizontal\").sortable({\n+\t\t\t\taxis: \"x\",\n+\t\t\t\tcontainment: \"parent\",\n+\t\t\t\tscroll: false,\n+\t\t\t\ttolerance: \"intersect\"\n+\t\t\t}),\n+\t\titem = element.find(\".wide\").eq(0);\n+\n+\titem.simulate(\"drag\", { dx: -150 });\n+\n+\tequal(item.index(), 0, \"Item is sorted to first position\");\n+\n+\titem.simulate(\"drag\", { dx: 150 });\n+\n+\tequal(item.index(), 4, \"Item is sorted to last position\");\n+});\n+\n+test(\"#5772: wide element pointer sorting to first and last position on x-axis\", function() {\n+\texpect(2);\n+\n+\tvar element = $(\"#sortable-horizontal\").sortable({\n+\t\t\t\taxis: \"x\",\n+\t\t\t\tcontainment: \"parent\",\n+\t\t\t\tscroll: false,\n+\t\t\t\ttolerance: \"pointer\"\n+\t\t\t}),\n+\t\titem = element.find(\".wide\").eq(0);\n+\n+\titem.simulate(\"drag\", { dx: -150 });\n+\n+\tequal(item.index(), 0, \"Item is sorted to first position\");\n+\n+\titem.simulate(\"drag\", { dx: 150 });\n+\n+\tequal(item.index(), 4, \"Item is sorted to last position\");\n+});\n+\n+test(\"#5772: tall element intersect sorting to first and last position on y-axis\", function() {\n+\texpect(2);\n+\n+\tvar element = $(\"#sortable-vertical\").sortable({\n+\t\t\t\taxis: \"y\",\n+\t\t\t\tcontainment: \"parent\",\n+\t\t\t\tscroll: false,\n+\t\t\t\ttolerance: \"intersect\"\n+\t\t\t}),\n+\t\titem = element.find(\".tall\").eq(0);\n+\n+\titem.simulate(\"drag\", { dy: -150 });\n+\n+\tequal(item.index(), 0, \"Item is sorted to first position\");\n+\n+\titem.simulate(\"drag\", { dy: 150 });\n+\n+\tequal(item.index(), 4, \"Item is sorted to last position\");\n+});\n+\n+test(\"#5772: tall element pointer sorting to first and last position on y-axis\", function() {\n+\texpect(2);\n+\n+\tvar element = $(\"#sortable-vertical\").sortable({\n+\t\t\t\taxis: \"y\",\n+\t\t\t\tcontainment: \"parent\",\n+\t\t\t\tscroll: false,\n+\t\t\t\ttolerance: \"pointer\"\n+\t\t\t}),\n+\t\titem = element.find(\".tall\").eq(0);\n+\n+\titem.simulate(\"drag\", { dy: -150 });\n+\n+\tequal(item.index(), 0, \"Item is sorted to first position\");\n+\n+\titem.simulate(\"drag\", { dy: 150 });\n+\n+\tequal(item.index(), 4, \"Item is sorted to last position\");\n+});\n+\n+test(\"#5772: element intersect sorting to first and last position on grid\", function() {\n+\texpect(2);\n+\n+\tvar element = $(\"#sortable-grid\").sortable({\n+\t\t\t\tcontainment: \"parent\",","path":"tests/unit/sortable/sortable_options.js","position":90,"original_position":90,"commit_id":"d4288e615b7a40dcaf416f5168c6e0bbf834c3a9","original_commit_id":"d4288e615b7a40dcaf416f5168c6e0bbf834c3a9","user":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"body":"this should only be 1 indent?","created_at":"2015-02-06T08:44:13Z","updated_at":"2015-02-06T08:44:13Z","html_url":"https://github.com/jquery/jquery-ui/pull/1424#discussion_r24228355","pull_request_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424","_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/24228355"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1424#discussion_r24228355"},"pull_request":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424","id":27228351,"html_url":"https://github.com/jquery/jquery-ui/pull/1424","diff_url":"https://github.com/jquery/jquery-ui/pull/1424.diff","patch_url":"https://github.com/jquery/jquery-ui/pull/1424.patch","issue_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1424","number":1424,"state":"open","locked":false,"title":"Sortable: added checks for the helper touching the edge of the containment while dragging","user":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"body":"Rebased from https://github.com/jquery/jquery-ui/pull/1060 - I'll handle any comments to get this in as @mickylad is busy at the moment\r\n\r\nFixed #5772 - Sortable: containment parent restricting replacement of first and last elements\r\n\r\nThis issue can be reproduced based on where the mouse is positioned when sorting - in the patched versions you can drag from anywhere in the item to trigger a rearrangement, where as in the unpatched versions you must drag such that the initial mouse down position inside the item will overlap with the target item.\r\n\r\nThere is also an existing issue where the vertical container will be pushed down when sorting into the last index, which is not fixed in this pull request.","created_at":"2015-01-12T21:38:57Z","updated_at":"2015-02-06T08:44:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08a4cfb6eff00004ef6d76400cfdcdb344770bea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424/commits","review_comments_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424/comments","review_comment_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1424/comments","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/d4288e615b7a40dcaf416f5168c6e0bbf834c3a9","head":{"label":"lukeapage:sortable-patch","ref":"sortable-patch","sha":"d4288e615b7a40dcaf416f5168c6e0bbf834c3a9","user":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"repo":{"id":12002315,"name":"jquery-ui","full_name":"lukeapage/jquery-ui","owner":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lukeapage/jquery-ui","description":"The official jQuery user interface library.","fork":true,"url":"https://api.github.com/repos/lukeapage/jquery-ui","forks_url":"https://api.github.com/repos/lukeapage/jquery-ui/forks","keys_url":"https://api.github.com/repos/lukeapage/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lukeapage/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lukeapage/jquery-ui/teams","hooks_url":"https://api.github.com/repos/lukeapage/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/lukeapage/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/lukeapage/jquery-ui/events","assignees_url":"https://api.github.com/repos/lukeapage/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/lukeapage/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/lukeapage/jquery-ui/tags","blobs_url":"https://api.github.com/repos/lukeapage/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lukeapage/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lukeapage/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/lukeapage/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lukeapage/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/lukeapage/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/lukeapage/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/lukeapage/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/lukeapage/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/lukeapage/jquery-ui/subscription","commits_url":"https://api.github.com/repos/lukeapage/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/lukeapage/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/lukeapage/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/lukeapage/jquery-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/lukeapage/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/lukeapage/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lukeapage/jquery-ui/merges","archive_url":"https://api.github.com/repos/lukeapage/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lukeapage/jquery-ui/downloads","issues_url":"https://api.github.com/repos/lukeapage/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/lukeapage/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/lukeapage/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/lukeapage/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lukeapage/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/lukeapage/jquery-ui/releases{/id}","created_at":"2013-08-09T14:08:37Z","updated_at":"2015-01-10T10:24:38Z","pushed_at":"2015-01-12T21:50:50Z","git_url":"git://github.com/lukeapage/jquery-ui.git","ssh_url":"git@github.com:lukeapage/jquery-ui.git","clone_url":"https://github.com/lukeapage/jquery-ui.git","svn_url":"https://github.com/lukeapage/jquery-ui","homepage":"http://jqueryui.com/","size":25434,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"65584c1640f8c7430587738c3c4cd7dd8010a2a5","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":478996,"name":"jquery-ui","full_name":"jquery/jquery-ui","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/jquery-ui","description":"The official jQuery user interface library.","fork":false,"url":"https://api.github.com/repos/jquery/jquery-ui","forks_url":"https://api.github.com/repos/jquery/jquery-ui/forks","keys_url":"https://api.github.com/repos/jquery/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery-ui/teams","hooks_url":"https://api.github.com/repos/jquery/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery-ui/events","assignees_url":"https://api.github.com/repos/jquery/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery-ui/tags","blobs_url":"https://api.github.com/repos/jquery/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery-ui/subscription","commits_url":"https://api.github.com/repos/jquery/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery-ui/issues/comments/{number}","contents_url":"https://api.github.com/repos/jquery/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery-ui/merges","archive_url":"https://api.github.com/repos/jquery/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery-ui/downloads","issues_url":"https://api.github.com/repos/jquery/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery-ui/releases{/id}","created_at":"2010-01-19T14:40:34Z","updated_at":"2015-02-06T04:03:14Z","pushed_at":"2015-02-05T14:17:44Z","git_url":"git://github.com/jquery/jquery-ui.git","ssh_url":"git@github.com:jquery/jquery-ui.git","clone_url":"https://github.com/jquery/jquery-ui.git","svn_url":"https://github.com/jquery/jquery-ui","homepage":"http://jqueryui.com/","size":45482,"stargazers_count":8723,"watchers_count":8723,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3332,"mirror_url":null,"open_issues_count":26,"forks":3332,"open_issues":26,"watchers":8723,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1424"},"issue":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1424"},"comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1424/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1424/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/jquery-ui/statuses/d4288e615b7a40dcaf416f5168c6e0bbf834c3a9"}}}}