{"action":"created","comment":{"url":"https://api.github.com/repos/bitovi/canjs/pulls/comments/24426976","id":24426976,"diff_hunk":"@@ -236,8 +236,15 @@ steal(\"can/util\", \"can/view/mustache\", \"can/control\", function (can) {\n \t\t\tif (!this.element) {\n \t\t\t\treturn;\n \t\t\t}\n+\t\t\tvar el = this.element[0];\n+\t\t\t\n \t\t\t// Set the value of the attribute passed in to reflect what the user typed\n-\t\t\tthis.options.value(this.element[0].value);\n+\t\t\tvar newVal = this.options.value(el.value);","path":"view/bindings/bindings.js","position":8,"original_position":8,"commit_id":"f75a3a6cabd11b47033640012f4442fce4ceb678","original_commit_id":"f75a3a6cabd11b47033640012f4442fce4ceb678","user":{"login":"justinbmeyer","id":78602,"avatar_url":"https://avatars.githubusercontent.com/u/78602?v=3","gravatar_id":"","url":"https://api.github.com/users/justinbmeyer","html_url":"https://github.com/justinbmeyer","followers_url":"https://api.github.com/users/justinbmeyer/followers","following_url":"https://api.github.com/users/justinbmeyer/following{/other_user}","gists_url":"https://api.github.com/users/justinbmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinbmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinbmeyer/subscriptions","organizations_url":"https://api.github.com/users/justinbmeyer/orgs","repos_url":"https://api.github.com/users/justinbmeyer/repos","events_url":"https://api.github.com/users/justinbmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/justinbmeyer/received_events","type":"User","site_admin":false},"body":"I don't think can.compute necessarily always returns its current value when being set.  I would change this to:\r\n\r\n```\r\nthis.options.value(el.value)\r\nvar newVal = this.options.value();\r\n```\r\n","created_at":"2015-02-10T16:38:50Z","updated_at":"2015-02-10T16:38:50Z","html_url":"https://github.com/bitovi/canjs/pull/888#discussion_r24426976","pull_request_url":"https://api.github.com/repos/bitovi/canjs/pulls/888","_links":{"self":{"href":"https://api.github.com/repos/bitovi/canjs/pulls/comments/24426976"},"html":{"href":"https://github.com/bitovi/canjs/pull/888#discussion_r24426976"},"pull_request":{"href":"https://api.github.com/repos/bitovi/canjs/pulls/888"}}},"pull_request":{"url":"https://api.github.com/repos/bitovi/canjs/pulls/888","id":14838791,"html_url":"https://github.com/bitovi/canjs/pull/888","diff_url":"https://github.com/bitovi/canjs/pull/888.diff","patch_url":"https://github.com/bitovi/canjs/pull/888.patch","issue_url":"https://api.github.com/repos/bitovi/canjs/issues/888","number":888,"state":"open","locked":false,"title":"Ensure can-value bound input stay in sync with compute","user":{"login":"matthewp","id":361671,"avatar_url":"https://avatars.githubusercontent.com/u/361671?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewp","html_url":"https://github.com/matthewp","followers_url":"https://api.github.com/users/matthewp/followers","following_url":"https://api.github.com/users/matthewp/following{/other_user}","gists_url":"https://api.github.com/users/matthewp/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewp/subscriptions","organizations_url":"https://api.github.com/users/matthewp/orgs","repos_url":"https://api.github.com/users/matthewp/repos","events_url":"https://api.github.com/users/matthewp/events{/privacy}","received_events_url":"https://api.github.com/users/matthewp/received_events","type":"User","site_admin":false},"body":"It's possible for a `can-value` bound input to become out of sync with it's underlying data if that data is a compute with a setter function. The setter function might reject the user's input or set the value to something else entirely.\r\n\r\nPreviously we were assuming that the compute's new value would always be the same as the input's value. This checks to make sure that the values are the same, otherwise it sets the input's value to reflect the *actual* value of the compute.\r\n\r\nFixes #887","created_at":"2014-04-16T18:33:13Z","updated_at":"2015-02-10T16:38:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ca6ad596478a8e91333baaef86d6d16c7cbfd31","assignee":null,"milestone":{"url":"https://api.github.com/repos/bitovi/canjs/milestones/20","labels_url":"https://api.github.com/repos/bitovi/canjs/milestones/20/labels","id":640429,"number":20,"title":"2.2.0","description":"Minor release","creator":{"login":"ccummings","id":464282,"avatar_url":"https://avatars.githubusercontent.com/u/464282?v=3","gravatar_id":"","url":"https://api.github.com/users/ccummings","html_url":"https://github.com/ccummings","followers_url":"https://api.github.com/users/ccummings/followers","following_url":"https://api.github.com/users/ccummings/following{/other_user}","gists_url":"https://api.github.com/users/ccummings/gists{/gist_id}","starred_url":"https://api.github.com/users/ccummings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccummings/subscriptions","organizations_url":"https://api.github.com/users/ccummings/orgs","repos_url":"https://api.github.com/users/ccummings/repos","events_url":"https://api.github.com/users/ccummings/events{/privacy}","received_events_url":"https://api.github.com/users/ccummings/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":6,"state":"open","created_at":"2014-04-25T15:43:19Z","updated_at":"2015-02-10T01:02:09Z","due_on":"2015-01-16T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/bitovi/canjs/pulls/888/commits","review_comments_url":"https://api.github.com/repos/bitovi/canjs/pulls/888/comments","review_comment_url":"https://api.github.com/repos/bitovi/canjs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/bitovi/canjs/issues/888/comments","statuses_url":"https://api.github.com/repos/bitovi/canjs/statuses/f75a3a6cabd11b47033640012f4442fce4ceb678","head":{"label":"matthewp:issue-887","ref":"issue-887","sha":"f75a3a6cabd11b47033640012f4442fce4ceb678","user":{"login":"matthewp","id":361671,"avatar_url":"https://avatars.githubusercontent.com/u/361671?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewp","html_url":"https://github.com/matthewp","followers_url":"https://api.github.com/users/matthewp/followers","following_url":"https://api.github.com/users/matthewp/following{/other_user}","gists_url":"https://api.github.com/users/matthewp/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewp/subscriptions","organizations_url":"https://api.github.com/users/matthewp/orgs","repos_url":"https://api.github.com/users/matthewp/repos","events_url":"https://api.github.com/users/matthewp/events{/privacy}","received_events_url":"https://api.github.com/users/matthewp/received_events","type":"User","site_admin":false},"repo":{"id":9401600,"name":"canjs","full_name":"matthewp/canjs","owner":{"login":"matthewp","id":361671,"avatar_url":"https://avatars.githubusercontent.com/u/361671?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewp","html_url":"https://github.com/matthewp","followers_url":"https://api.github.com/users/matthewp/followers","following_url":"https://api.github.com/users/matthewp/following{/other_user}","gists_url":"https://api.github.com/users/matthewp/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewp/subscriptions","organizations_url":"https://api.github.com/users/matthewp/orgs","repos_url":"https://api.github.com/users/matthewp/repos","events_url":"https://api.github.com/users/matthewp/events{/privacy}","received_events_url":"https://api.github.com/users/matthewp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthewp/canjs","description":"Can do JS, better, faster, easier.","fork":true,"url":"https://api.github.com/repos/matthewp/canjs","forks_url":"https://api.github.com/repos/matthewp/canjs/forks","keys_url":"https://api.github.com/repos/matthewp/canjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthewp/canjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthewp/canjs/teams","hooks_url":"https://api.github.com/repos/matthewp/canjs/hooks","issue_events_url":"https://api.github.com/repos/matthewp/canjs/issues/events{/number}","events_url":"https://api.github.com/repos/matthewp/canjs/events","assignees_url":"https://api.github.com/repos/matthewp/canjs/assignees{/user}","branches_url":"https://api.github.com/repos/matthewp/canjs/branches{/branch}","tags_url":"https://api.github.com/repos/matthewp/canjs/tags","blobs_url":"https://api.github.com/repos/matthewp/canjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthewp/canjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthewp/canjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthewp/canjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthewp/canjs/statuses/{sha}","languages_url":"https://api.github.com/repos/matthewp/canjs/languages","stargazers_url":"https://api.github.com/repos/matthewp/canjs/stargazers","contributors_url":"https://api.github.com/repos/matthewp/canjs/contributors","subscribers_url":"https://api.github.com/repos/matthewp/canjs/subscribers","subscription_url":"https://api.github.com/repos/matthewp/canjs/subscription","commits_url":"https://api.github.com/repos/matthewp/canjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthewp/canjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthewp/canjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthewp/canjs/issues/comments/{number}","contents_url":"https://api.github.com/repos/matthewp/canjs/contents/{+path}","compare_url":"https://api.github.com/repos/matthewp/canjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthewp/canjs/merges","archive_url":"https://api.github.com/repos/matthewp/canjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthewp/canjs/downloads","issues_url":"https://api.github.com/repos/matthewp/canjs/issues{/number}","pulls_url":"https://api.github.com/repos/matthewp/canjs/pulls{/number}","milestones_url":"https://api.github.com/repos/matthewp/canjs/milestones{/number}","notifications_url":"https://api.github.com/repos/matthewp/canjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthewp/canjs/labels{/name}","releases_url":"https://api.github.com/repos/matthewp/canjs/releases{/id}","created_at":"2013-04-12T19:04:34Z","updated_at":"2014-07-02T20:27:34Z","pushed_at":"2014-12-05T14:34:35Z","git_url":"git://github.com/matthewp/canjs.git","ssh_url":"git@github.com:matthewp/canjs.git","clone_url":"https://github.com/matthewp/canjs.git","svn_url":"https://github.com/matthewp/canjs","homepage":"canjs.us","size":31593,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"bitovi:minor","ref":"minor","sha":"5cd0da533be314581e231917d6fdedb5c138eaf8","user":{"login":"bitovi","id":2782656,"avatar_url":"https://avatars.githubusercontent.com/u/2782656?v=3","gravatar_id":"","url":"https://api.github.com/users/bitovi","html_url":"https://github.com/bitovi","followers_url":"https://api.github.com/users/bitovi/followers","following_url":"https://api.github.com/users/bitovi/following{/other_user}","gists_url":"https://api.github.com/users/bitovi/gists{/gist_id}","starred_url":"https://api.github.com/users/bitovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitovi/subscriptions","organizations_url":"https://api.github.com/users/bitovi/orgs","repos_url":"https://api.github.com/users/bitovi/repos","events_url":"https://api.github.com/users/bitovi/events{/privacy}","received_events_url":"https://api.github.com/users/bitovi/received_events","type":"Organization","site_admin":false},"repo":{"id":3228363,"name":"canjs","full_name":"bitovi/canjs","owner":{"login":"bitovi","id":2782656,"avatar_url":"https://avatars.githubusercontent.com/u/2782656?v=3","gravatar_id":"","url":"https://api.github.com/users/bitovi","html_url":"https://github.com/bitovi","followers_url":"https://api.github.com/users/bitovi/followers","following_url":"https://api.github.com/users/bitovi/following{/other_user}","gists_url":"https://api.github.com/users/bitovi/gists{/gist_id}","starred_url":"https://api.github.com/users/bitovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitovi/subscriptions","organizations_url":"https://api.github.com/users/bitovi/orgs","repos_url":"https://api.github.com/users/bitovi/repos","events_url":"https://api.github.com/users/bitovi/events{/privacy}","received_events_url":"https://api.github.com/users/bitovi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitovi/canjs","description":"Can do JS, better, faster, easier.","fork":false,"url":"https://api.github.com/repos/bitovi/canjs","forks_url":"https://api.github.com/repos/bitovi/canjs/forks","keys_url":"https://api.github.com/repos/bitovi/canjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitovi/canjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitovi/canjs/teams","hooks_url":"https://api.github.com/repos/bitovi/canjs/hooks","issue_events_url":"https://api.github.com/repos/bitovi/canjs/issues/events{/number}","events_url":"https://api.github.com/repos/bitovi/canjs/events","assignees_url":"https://api.github.com/repos/bitovi/canjs/assignees{/user}","branches_url":"https://api.github.com/repos/bitovi/canjs/branches{/branch}","tags_url":"https://api.github.com/repos/bitovi/canjs/tags","blobs_url":"https://api.github.com/repos/bitovi/canjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitovi/canjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitovi/canjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitovi/canjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitovi/canjs/statuses/{sha}","languages_url":"https://api.github.com/repos/bitovi/canjs/languages","stargazers_url":"https://api.github.com/repos/bitovi/canjs/stargazers","contributors_url":"https://api.github.com/repos/bitovi/canjs/contributors","subscribers_url":"https://api.github.com/repos/bitovi/canjs/subscribers","subscription_url":"https://api.github.com/repos/bitovi/canjs/subscription","commits_url":"https://api.github.com/repos/bitovi/canjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitovi/canjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitovi/canjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitovi/canjs/issues/comments/{number}","contents_url":"https://api.github.com/repos/bitovi/canjs/contents/{+path}","compare_url":"https://api.github.com/repos/bitovi/canjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitovi/canjs/merges","archive_url":"https://api.github.com/repos/bitovi/canjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitovi/canjs/downloads","issues_url":"https://api.github.com/repos/bitovi/canjs/issues{/number}","pulls_url":"https://api.github.com/repos/bitovi/canjs/pulls{/number}","milestones_url":"https://api.github.com/repos/bitovi/canjs/milestones{/number}","notifications_url":"https://api.github.com/repos/bitovi/canjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitovi/canjs/labels{/name}","releases_url":"https://api.github.com/repos/bitovi/canjs/releases{/id}","created_at":"2012-01-20T17:57:21Z","updated_at":"2015-02-10T09:49:07Z","pushed_at":"2015-02-10T01:02:11Z","git_url":"git://github.com/bitovi/canjs.git","ssh_url":"git@github.com:bitovi/canjs.git","clone_url":"https://github.com/bitovi/canjs.git","svn_url":"https://github.com/bitovi/canjs","homepage":"canjs.com","size":43083,"stargazers_count":1084,"watchers_count":1084,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":301,"mirror_url":null,"open_issues_count":275,"forks":301,"open_issues":275,"watchers":1084,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitovi/canjs/pulls/888"},"html":{"href":"https://github.com/bitovi/canjs/pull/888"},"issue":{"href":"https://api.github.com/repos/bitovi/canjs/issues/888"},"comments":{"href":"https://api.github.com/repos/bitovi/canjs/issues/888/comments"},"review_comments":{"href":"https://api.github.com/repos/bitovi/canjs/pulls/888/comments"},"review_comment":{"href":"https://api.github.com/repos/bitovi/canjs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/bitovi/canjs/pulls/888/commits"},"statuses":{"href":"https://api.github.com/repos/bitovi/canjs/statuses/f75a3a6cabd11b47033640012f4442fce4ceb678"}}}}