{"action":"created","comment":{"url":"https://api.github.com/repos/montagejs/montage/pulls/comments/32277415","id":32277415,"diff_hunk":"@@ -773,7 +773,13 @@ var RangeController = exports.RangeController = Montage.specialize( /** @lends R\n                 // remove all values from the selection that were removed (but\n                 // not added back)\n                 minus.deleteEach(plus, equals);\n-                if (this.selection) {\n+\n+                if (this.selection.length) {\n+                    // ensure selection always has content\n+                    if (this.content.length && this.avoidsEmptySelection && !this.multiSelect) {\n+                        // selection can't contain previous content value as content already changed\n+                        this.selection.add(this.content[this.content.length - 1]);\n+                    }","path":"core/range-controller.js","position":68,"original_position":68,"commit_id":"0cc8e57e522425d85163b5721e1bf7a237cf70f3","original_commit_id":"0cc8e57e522425d85163b5721e1bf7a237cf70f3","user":{"login":"thibaultzanini","id":3347451,"avatar_url":"https://avatars.githubusercontent.com/u/3347451?v=3","gravatar_id":"","url":"https://api.github.com/users/thibaultzanini","html_url":"https://github.com/thibaultzanini","followers_url":"https://api.github.com/users/thibaultzanini/followers","following_url":"https://api.github.com/users/thibaultzanini/following{/other_user}","gists_url":"https://api.github.com/users/thibaultzanini/gists{/gist_id}","starred_url":"https://api.github.com/users/thibaultzanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thibaultzanini/subscriptions","organizations_url":"https://api.github.com/users/thibaultzanini/orgs","repos_url":"https://api.github.com/users/thibaultzanini/repos","events_url":"https://api.github.com/users/thibaultzanini/events{/privacy}","received_events_url":"https://api.github.com/users/thibaultzanini/received_events","type":"User","site_admin":false},"body":"@marchant do you have an real user case as an exemple ?","created_at":"2015-06-11T22:59:20Z","updated_at":"2015-06-11T22:59:20Z","html_url":"https://github.com/montagejs/montage/pull/1565#discussion_r32277415","pull_request_url":"https://api.github.com/repos/montagejs/montage/pulls/1565","_links":{"self":{"href":"https://api.github.com/repos/montagejs/montage/pulls/comments/32277415"},"html":{"href":"https://github.com/montagejs/montage/pull/1565#discussion_r32277415"},"pull_request":{"href":"https://api.github.com/repos/montagejs/montage/pulls/1565"}}},"pull_request":{"url":"https://api.github.com/repos/montagejs/montage/pulls/1565","id":35400146,"html_url":"https://github.com/montagejs/montage/pull/1565","diff_url":"https://github.com/montagejs/montage/pull/1565.diff","patch_url":"https://github.com/montagejs/montage/pull/1565.patch","issue_url":"https://api.github.com/repos/montagejs/montage/issues/1565","number":1565,"state":"open","locked":false,"title":"Fixed RangeController issues","user":{"login":"rayshan","id":3760840,"avatar_url":"https://avatars.githubusercontent.com/u/3760840?v=3","gravatar_id":"","url":"https://api.github.com/users/rayshan","html_url":"https://github.com/rayshan","followers_url":"https://api.github.com/users/rayshan/followers","following_url":"https://api.github.com/users/rayshan/following{/other_user}","gists_url":"https://api.github.com/users/rayshan/gists{/gist_id}","starred_url":"https://api.github.com/users/rayshan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayshan/subscriptions","organizations_url":"https://api.github.com/users/rayshan/orgs","repos_url":"https://api.github.com/users/rayshan/repos","events_url":"https://api.github.com/users/rayshan/events{/privacy}","received_events_url":"https://api.github.com/users/rayshan/received_events","type":"User","site_admin":false},"body":"Discovered during work on Succession\r\n\r\n- Ensure selection always has content\r\n- Use swap instead of clear / add to prevent setting selection\r\n  multiple times","created_at":"2015-05-14T07:30:20Z","updated_at":"2015-06-11T22:59:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d88c24143304eceedd09f1110cd73444fd1f5d39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/montagejs/montage/pulls/1565/commits","review_comments_url":"https://api.github.com/repos/montagejs/montage/pulls/1565/comments","review_comment_url":"https://api.github.com/repos/montagejs/montage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/montagejs/montage/issues/1565/comments","statuses_url":"https://api.github.com/repos/montagejs/montage/statuses/0cc8e57e522425d85163b5721e1bf7a237cf70f3","head":{"label":"rayshan:pr-rangecontroller","ref":"pr-rangecontroller","sha":"0cc8e57e522425d85163b5721e1bf7a237cf70f3","user":{"login":"rayshan","id":3760840,"avatar_url":"https://avatars.githubusercontent.com/u/3760840?v=3","gravatar_id":"","url":"https://api.github.com/users/rayshan","html_url":"https://github.com/rayshan","followers_url":"https://api.github.com/users/rayshan/followers","following_url":"https://api.github.com/users/rayshan/following{/other_user}","gists_url":"https://api.github.com/users/rayshan/gists{/gist_id}","starred_url":"https://api.github.com/users/rayshan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayshan/subscriptions","organizations_url":"https://api.github.com/users/rayshan/orgs","repos_url":"https://api.github.com/users/rayshan/repos","events_url":"https://api.github.com/users/rayshan/events{/privacy}","received_events_url":"https://api.github.com/users/rayshan/received_events","type":"User","site_admin":false},"repo":{"id":29500471,"name":"montage","full_name":"rayshan/montage","owner":{"login":"rayshan","id":3760840,"avatar_url":"https://avatars.githubusercontent.com/u/3760840?v=3","gravatar_id":"","url":"https://api.github.com/users/rayshan","html_url":"https://github.com/rayshan","followers_url":"https://api.github.com/users/rayshan/followers","following_url":"https://api.github.com/users/rayshan/following{/other_user}","gists_url":"https://api.github.com/users/rayshan/gists{/gist_id}","starred_url":"https://api.github.com/users/rayshan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayshan/subscriptions","organizations_url":"https://api.github.com/users/rayshan/orgs","repos_url":"https://api.github.com/users/rayshan/repos","events_url":"https://api.github.com/users/rayshan/events{/privacy}","received_events_url":"https://api.github.com/users/rayshan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rayshan/montage","description":"MontageJS is an elegant, open source HTML5 framework maintained by Montage Studio that rivals native SDKs, yet is easier to learn. It offers modular components, two-way data binding, and much more. Join us on irc.freenode.net#montage. Sign up for our beta to build MontageJS applications in the cloud.","fork":true,"url":"https://api.github.com/repos/rayshan/montage","forks_url":"https://api.github.com/repos/rayshan/montage/forks","keys_url":"https://api.github.com/repos/rayshan/montage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rayshan/montage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rayshan/montage/teams","hooks_url":"https://api.github.com/repos/rayshan/montage/hooks","issue_events_url":"https://api.github.com/repos/rayshan/montage/issues/events{/number}","events_url":"https://api.github.com/repos/rayshan/montage/events","assignees_url":"https://api.github.com/repos/rayshan/montage/assignees{/user}","branches_url":"https://api.github.com/repos/rayshan/montage/branches{/branch}","tags_url":"https://api.github.com/repos/rayshan/montage/tags","blobs_url":"https://api.github.com/repos/rayshan/montage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rayshan/montage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rayshan/montage/git/refs{/sha}","trees_url":"https://api.github.com/repos/rayshan/montage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rayshan/montage/statuses/{sha}","languages_url":"https://api.github.com/repos/rayshan/montage/languages","stargazers_url":"https://api.github.com/repos/rayshan/montage/stargazers","contributors_url":"https://api.github.com/repos/rayshan/montage/contributors","subscribers_url":"https://api.github.com/repos/rayshan/montage/subscribers","subscription_url":"https://api.github.com/repos/rayshan/montage/subscription","commits_url":"https://api.github.com/repos/rayshan/montage/commits{/sha}","git_commits_url":"https://api.github.com/repos/rayshan/montage/git/commits{/sha}","comments_url":"https://api.github.com/repos/rayshan/montage/comments{/number}","issue_comment_url":"https://api.github.com/repos/rayshan/montage/issues/comments{/number}","contents_url":"https://api.github.com/repos/rayshan/montage/contents/{+path}","compare_url":"https://api.github.com/repos/rayshan/montage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rayshan/montage/merges","archive_url":"https://api.github.com/repos/rayshan/montage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rayshan/montage/downloads","issues_url":"https://api.github.com/repos/rayshan/montage/issues{/number}","pulls_url":"https://api.github.com/repos/rayshan/montage/pulls{/number}","milestones_url":"https://api.github.com/repos/rayshan/montage/milestones{/number}","notifications_url":"https://api.github.com/repos/rayshan/montage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rayshan/montage/labels{/name}","releases_url":"https://api.github.com/repos/rayshan/montage/releases{/id}","created_at":"2015-01-19T22:43:06Z","updated_at":"2015-03-02T22:43:58Z","pushed_at":"2015-06-05T23:58:26Z","git_url":"git://github.com/rayshan/montage.git","ssh_url":"git@github.com:rayshan/montage.git","clone_url":"https://github.com/rayshan/montage.git","svn_url":"https://github.com/rayshan/montage","homepage":"http://montagestudio.com/montagejs","size":25399,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"montagejs:master","ref":"master","sha":"e13d607e4649afe751202cbf513671b137d6efc0","user":{"login":"montagejs","id":2008799,"avatar_url":"https://avatars.githubusercontent.com/u/2008799?v=3","gravatar_id":"","url":"https://api.github.com/users/montagejs","html_url":"https://github.com/montagejs","followers_url":"https://api.github.com/users/montagejs/followers","following_url":"https://api.github.com/users/montagejs/following{/other_user}","gists_url":"https://api.github.com/users/montagejs/gists{/gist_id}","starred_url":"https://api.github.com/users/montagejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montagejs/subscriptions","organizations_url":"https://api.github.com/users/montagejs/orgs","repos_url":"https://api.github.com/users/montagejs/repos","events_url":"https://api.github.com/users/montagejs/events{/privacy}","received_events_url":"https://api.github.com/users/montagejs/received_events","type":"Organization","site_admin":false},"repo":{"id":2943911,"name":"montage","full_name":"montagejs/montage","owner":{"login":"montagejs","id":2008799,"avatar_url":"https://avatars.githubusercontent.com/u/2008799?v=3","gravatar_id":"","url":"https://api.github.com/users/montagejs","html_url":"https://github.com/montagejs","followers_url":"https://api.github.com/users/montagejs/followers","following_url":"https://api.github.com/users/montagejs/following{/other_user}","gists_url":"https://api.github.com/users/montagejs/gists{/gist_id}","starred_url":"https://api.github.com/users/montagejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montagejs/subscriptions","organizations_url":"https://api.github.com/users/montagejs/orgs","repos_url":"https://api.github.com/users/montagejs/repos","events_url":"https://api.github.com/users/montagejs/events{/privacy}","received_events_url":"https://api.github.com/users/montagejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/montagejs/montage","description":"MontageJS is an elegant, open source HTML5 framework maintained by Montage Studio that rivals native SDKs, yet is easier to learn. It offers modular components, two-way data binding, and much more. Join us on irc.freenode.net#montage. Sign up for our beta to build MontageJS applications in the cloud.","fork":false,"url":"https://api.github.com/repos/montagejs/montage","forks_url":"https://api.github.com/repos/montagejs/montage/forks","keys_url":"https://api.github.com/repos/montagejs/montage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/montagejs/montage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/montagejs/montage/teams","hooks_url":"https://api.github.com/repos/montagejs/montage/hooks","issue_events_url":"https://api.github.com/repos/montagejs/montage/issues/events{/number}","events_url":"https://api.github.com/repos/montagejs/montage/events","assignees_url":"https://api.github.com/repos/montagejs/montage/assignees{/user}","branches_url":"https://api.github.com/repos/montagejs/montage/branches{/branch}","tags_url":"https://api.github.com/repos/montagejs/montage/tags","blobs_url":"https://api.github.com/repos/montagejs/montage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/montagejs/montage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/montagejs/montage/git/refs{/sha}","trees_url":"https://api.github.com/repos/montagejs/montage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/montagejs/montage/statuses/{sha}","languages_url":"https://api.github.com/repos/montagejs/montage/languages","stargazers_url":"https://api.github.com/repos/montagejs/montage/stargazers","contributors_url":"https://api.github.com/repos/montagejs/montage/contributors","subscribers_url":"https://api.github.com/repos/montagejs/montage/subscribers","subscription_url":"https://api.github.com/repos/montagejs/montage/subscription","commits_url":"https://api.github.com/repos/montagejs/montage/commits{/sha}","git_commits_url":"https://api.github.com/repos/montagejs/montage/git/commits{/sha}","comments_url":"https://api.github.com/repos/montagejs/montage/comments{/number}","issue_comment_url":"https://api.github.com/repos/montagejs/montage/issues/comments{/number}","contents_url":"https://api.github.com/repos/montagejs/montage/contents/{+path}","compare_url":"https://api.github.com/repos/montagejs/montage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/montagejs/montage/merges","archive_url":"https://api.github.com/repos/montagejs/montage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/montagejs/montage/downloads","issues_url":"https://api.github.com/repos/montagejs/montage/issues{/number}","pulls_url":"https://api.github.com/repos/montagejs/montage/pulls{/number}","milestones_url":"https://api.github.com/repos/montagejs/montage/milestones{/number}","notifications_url":"https://api.github.com/repos/montagejs/montage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/montagejs/montage/labels{/name}","releases_url":"https://api.github.com/repos/montagejs/montage/releases{/id}","created_at":"2011-12-08T23:18:21Z","updated_at":"2015-06-11T10:27:31Z","pushed_at":"2015-06-10T22:13:26Z","git_url":"git://github.com/montagejs/montage.git","ssh_url":"git@github.com:montagejs/montage.git","clone_url":"https://github.com/montagejs/montage.git","svn_url":"https://github.com/montagejs/montage","homepage":"http://montagestudio.com/montagejs","size":35473,"stargazers_count":1368,"watchers_count":1368,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":194,"mirror_url":null,"open_issues_count":105,"forks":194,"open_issues":105,"watchers":1368,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/montagejs/montage/pulls/1565"},"html":{"href":"https://github.com/montagejs/montage/pull/1565"},"issue":{"href":"https://api.github.com/repos/montagejs/montage/issues/1565"},"comments":{"href":"https://api.github.com/repos/montagejs/montage/issues/1565/comments"},"review_comments":{"href":"https://api.github.com/repos/montagejs/montage/pulls/1565/comments"},"review_comment":{"href":"https://api.github.com/repos/montagejs/montage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/montagejs/montage/pulls/1565/commits"},"statuses":{"href":"https://api.github.com/repos/montagejs/montage/statuses/0cc8e57e522425d85163b5721e1bf7a237cf70f3"}}}}