{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material/pulls/comments/59391023","id":59391023,"diff_hunk":"@@ -208,6 +208,17 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,\n   }\n \n   /**\n+   * Find the target for the wrap element which determines menu width\n+   * @returns {*}\n+   */\n+  function getWrapTarget() {\n+    for (var element = $element; element.length; element = element.parent()) {","path":"src/components/autocomplete/js/autocompleteController.js","position":17,"original_position":17,"commit_id":"3cd22812e32df86cd8036abd2b77740a02a5b820","original_commit_id":"3cd22812e32df86cd8036abd2b77740a02a5b820","user":{"login":"aperl","id":4137562,"avatar_url":"https://avatars.githubusercontent.com/u/4137562?v=3","gravatar_id":"","url":"https://api.github.com/users/aperl","html_url":"https://github.com/aperl","followers_url":"https://api.github.com/users/aperl/followers","following_url":"https://api.github.com/users/aperl/following{/other_user}","gists_url":"https://api.github.com/users/aperl/gists{/gist_id}","starred_url":"https://api.github.com/users/aperl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperl/subscriptions","organizations_url":"https://api.github.com/users/aperl/orgs","repos_url":"https://api.github.com/users/aperl/repos","events_url":"https://api.github.com/users/aperl/events{/privacy}","received_events_url":"https://api.github.com/users/aperl/received_events","type":"User","site_admin":false},"body":"For whatever reason the `md-autocomplete-snap` was only made to effect the vertical position.","created_at":"2016-04-12T14:57:37Z","updated_at":"2016-04-12T14:57:37Z","html_url":"https://github.com/angular/material/pull/7750#discussion_r59391023","pull_request_url":"https://api.github.com/repos/angular/material/pulls/7750","_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/comments/59391023"},"html":{"href":"https://github.com/angular/material/pull/7750#discussion_r59391023"},"pull_request":{"href":"https://api.github.com/repos/angular/material/pulls/7750"}}},"pull_request":{"url":"https://api.github.com/repos/angular/material/pulls/7750","id":64179470,"html_url":"https://github.com/angular/material/pull/7750","diff_url":"https://github.com/angular/material/pull/7750.diff","patch_url":"https://github.com/angular/material/pull/7750.patch","issue_url":"https://api.github.com/repos/angular/material/issues/7750","number":7750,"state":"open","locked":false,"title":"Add md-autocomplete-wrap-override","user":{"login":"aperl","id":4137562,"avatar_url":"https://avatars.githubusercontent.com/u/4137562?v=3","gravatar_id":"","url":"https://api.github.com/users/aperl","html_url":"https://github.com/aperl","followers_url":"https://api.github.com/users/aperl/followers","following_url":"https://api.github.com/users/aperl/following{/other_user}","gists_url":"https://api.github.com/users/aperl/gists{/gist_id}","starred_url":"https://api.github.com/users/aperl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperl/subscriptions","organizations_url":"https://api.github.com/users/aperl/orgs","repos_url":"https://api.github.com/users/aperl/repos","events_url":"https://api.github.com/users/aperl/events{/privacy}","received_events_url":"https://api.github.com/users/aperl/received_events","type":"User","site_admin":false},"body":"This allows a `md-autocomplete-wrap` to be applied to an ancestor of a `md-autocomplete` and cause that element to be used for evaluating the width of the autocomplete instead of the the `md-autocomplete-wrap` element. This addresses #4450 which constrains the width of the menu that pops up to the width of the auto complete wrapper.\r\n![autocomplete](https://cloud.githubusercontent.com/assets/4137562/14049549/8f234314-f27b-11e5-8649-40fa704bc10b.gif)\r\nWhen using chips and possibly in other situations it would be desirable to have the menu be the width of the chips component.\r\n![autocompleteoverride](https://cloud.githubusercontent.com/assets/4137562/14049561/b1c62788-f27b-11e5-9d0f-5a48d679c443.gif)\r\nAdding support for this attribute would allow for this and other similar behavior.\r\n\r\nA working version of this change can be seen at https://codepen.io/allenperl/pen/KzmQwr.","created_at":"2016-03-25T16:28:09Z","updated_at":"2016-04-12T14:57:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b340d0fc88ed15edd9e8ee165ebe2fb5749dfc6e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/material/pulls/7750/commits","review_comments_url":"https://api.github.com/repos/angular/material/pulls/7750/comments","review_comment_url":"https://api.github.com/repos/angular/material/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/material/issues/7750/comments","statuses_url":"https://api.github.com/repos/angular/material/statuses/3cd22812e32df86cd8036abd2b77740a02a5b820","head":{"label":"aperl:fix/autocomplete","ref":"fix/autocomplete","sha":"3cd22812e32df86cd8036abd2b77740a02a5b820","user":{"login":"aperl","id":4137562,"avatar_url":"https://avatars.githubusercontent.com/u/4137562?v=3","gravatar_id":"","url":"https://api.github.com/users/aperl","html_url":"https://github.com/aperl","followers_url":"https://api.github.com/users/aperl/followers","following_url":"https://api.github.com/users/aperl/following{/other_user}","gists_url":"https://api.github.com/users/aperl/gists{/gist_id}","starred_url":"https://api.github.com/users/aperl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperl/subscriptions","organizations_url":"https://api.github.com/users/aperl/orgs","repos_url":"https://api.github.com/users/aperl/repos","events_url":"https://api.github.com/users/aperl/events{/privacy}","received_events_url":"https://api.github.com/users/aperl/received_events","type":"User","site_admin":false},"repo":{"id":54650151,"name":"material","full_name":"aperl/material","owner":{"login":"aperl","id":4137562,"avatar_url":"https://avatars.githubusercontent.com/u/4137562?v=3","gravatar_id":"","url":"https://api.github.com/users/aperl","html_url":"https://github.com/aperl","followers_url":"https://api.github.com/users/aperl/followers","following_url":"https://api.github.com/users/aperl/following{/other_user}","gists_url":"https://api.github.com/users/aperl/gists{/gist_id}","starred_url":"https://api.github.com/users/aperl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aperl/subscriptions","organizations_url":"https://api.github.com/users/aperl/orgs","repos_url":"https://api.github.com/users/aperl/repos","events_url":"https://api.github.com/users/aperl/events{/privacy}","received_events_url":"https://api.github.com/users/aperl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aperl/material","description":"Material design for Angular","fork":true,"url":"https://api.github.com/repos/aperl/material","forks_url":"https://api.github.com/repos/aperl/material/forks","keys_url":"https://api.github.com/repos/aperl/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aperl/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aperl/material/teams","hooks_url":"https://api.github.com/repos/aperl/material/hooks","issue_events_url":"https://api.github.com/repos/aperl/material/issues/events{/number}","events_url":"https://api.github.com/repos/aperl/material/events","assignees_url":"https://api.github.com/repos/aperl/material/assignees{/user}","branches_url":"https://api.github.com/repos/aperl/material/branches{/branch}","tags_url":"https://api.github.com/repos/aperl/material/tags","blobs_url":"https://api.github.com/repos/aperl/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aperl/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aperl/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/aperl/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aperl/material/statuses/{sha}","languages_url":"https://api.github.com/repos/aperl/material/languages","stargazers_url":"https://api.github.com/repos/aperl/material/stargazers","contributors_url":"https://api.github.com/repos/aperl/material/contributors","subscribers_url":"https://api.github.com/repos/aperl/material/subscribers","subscription_url":"https://api.github.com/repos/aperl/material/subscription","commits_url":"https://api.github.com/repos/aperl/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/aperl/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/aperl/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/aperl/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/aperl/material/contents/{+path}","compare_url":"https://api.github.com/repos/aperl/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aperl/material/merges","archive_url":"https://api.github.com/repos/aperl/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aperl/material/downloads","issues_url":"https://api.github.com/repos/aperl/material/issues{/number}","pulls_url":"https://api.github.com/repos/aperl/material/pulls{/number}","milestones_url":"https://api.github.com/repos/aperl/material/milestones{/number}","notifications_url":"https://api.github.com/repos/aperl/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aperl/material/labels{/name}","releases_url":"https://api.github.com/repos/aperl/material/releases{/id}","deployments_url":"https://api.github.com/repos/aperl/material/deployments","created_at":"2016-03-24T14:55:12Z","updated_at":"2016-03-24T14:55:15Z","pushed_at":"2016-03-25T17:50:50Z","git_url":"git://github.com/aperl/material.git","ssh_url":"git@github.com:aperl/material.git","clone_url":"https://github.com/aperl/material.git","svn_url":"https://github.com/aperl/material","homepage":"https://material.angularjs.org/","size":41819,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"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":"angular:master","ref":"master","sha":"0b89a877ad31d0f7d425272f29d8c02600a12a88","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":21399598,"name":"material","full_name":"angular/material","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/material","description":"Material design for Angular","fork":false,"url":"https://api.github.com/repos/angular/material","forks_url":"https://api.github.com/repos/angular/material/forks","keys_url":"https://api.github.com/repos/angular/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material/teams","hooks_url":"https://api.github.com/repos/angular/material/hooks","issue_events_url":"https://api.github.com/repos/angular/material/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material/events","assignees_url":"https://api.github.com/repos/angular/material/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material/tags","blobs_url":"https://api.github.com/repos/angular/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material/languages","stargazers_url":"https://api.github.com/repos/angular/material/stargazers","contributors_url":"https://api.github.com/repos/angular/material/contributors","subscribers_url":"https://api.github.com/repos/angular/material/subscribers","subscription_url":"https://api.github.com/repos/angular/material/subscription","commits_url":"https://api.github.com/repos/angular/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/material/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material/merges","archive_url":"https://api.github.com/repos/angular/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material/downloads","issues_url":"https://api.github.com/repos/angular/material/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material/labels{/name}","releases_url":"https://api.github.com/repos/angular/material/releases{/id}","deployments_url":"https://api.github.com/repos/angular/material/deployments","created_at":"2014-07-01T19:20:06Z","updated_at":"2016-04-12T14:52:26Z","pushed_at":"2016-04-12T11:12:36Z","git_url":"git://github.com/angular/material.git","ssh_url":"git@github.com:angular/material.git","clone_url":"https://github.com/angular/material.git","svn_url":"https://github.com/angular/material","homepage":"https://material.angularjs.org/","size":79470,"stargazers_count":13206,"watchers_count":13206,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2634,"mirror_url":null,"open_issues_count":1724,"forks":2634,"open_issues":1724,"watchers":13206,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/7750"},"html":{"href":"https://github.com/angular/material/pull/7750"},"issue":{"href":"https://api.github.com/repos/angular/material/issues/7750"},"comments":{"href":"https://api.github.com/repos/angular/material/issues/7750/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material/pulls/7750/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/material/pulls/7750/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material/statuses/3cd22812e32df86cd8036abd2b77740a02a5b820"}}}}