{"action":"created","issue":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/349","labels_url":"https://api.github.com/repos/yabwe/medium-editor/issues/349/labels{/name}","comments_url":"https://api.github.com/repos/yabwe/medium-editor/issues/349/comments","events_url":"https://api.github.com/repos/yabwe/medium-editor/issues/349/events","html_url":"https://github.com/yabwe/medium-editor/issues/349","id":53153356,"number":349,"title":"Not using this.on() when attaching click handler to contenteditable","user":{"login":"nmielnik","id":2444240,"avatar_url":"https://avatars.githubusercontent.com/u/2444240?v=3","gravatar_id":"","url":"https://api.github.com/users/nmielnik","html_url":"https://github.com/nmielnik","followers_url":"https://api.github.com/users/nmielnik/followers","following_url":"https://api.github.com/users/nmielnik/following{/other_user}","gists_url":"https://api.github.com/users/nmielnik/gists{/gist_id}","starred_url":"https://api.github.com/users/nmielnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmielnik/subscriptions","organizations_url":"https://api.github.com/users/nmielnik/orgs","repos_url":"https://api.github.com/users/nmielnik/repos","events_url":"https://api.github.com/users/nmielnik/events{/privacy}","received_events_url":"https://api.github.com/users/nmielnik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-30T22:39:34Z","updated_at":"2015-07-15T23:24:35Z","closed_at":"2015-01-06T19:35:36Z","body":"I've noticed that the handy `this.on()` method is a great way to keep track of what event handlers have been attached, and allow for easily detaching everything when medium-editor is deactivated.\r\n\r\nHowever, I noticed that a specific click handler for all contentEditable elements is not being attached using this.on, so medium-editor cannot detach it later.\r\n\r\nSee [here](https://github.com/daviferreira/medium-editor/blob/8aa0c8f9514289182bd1a49f856e086e34fa3596/src/js/medium-editor.js#L758)\r\n\r\nWas there a specific reason for not using `this.on()` here?  Should this be changed to:\r\n\r\n```\r\nthis.on('click', this.elements[i], this.checkSelectionWrapper);\r\n```"},"comment":{"url":"https://api.github.com/repos/yabwe/medium-editor/issues/comments/121774889","html_url":"https://github.com/yabwe/medium-editor/issues/349#issuecomment-121774889","issue_url":"https://api.github.com/repos/yabwe/medium-editor/issues/349","id":121774889,"user":{"login":"nmielnik","id":2444240,"avatar_url":"https://avatars.githubusercontent.com/u/2444240?v=3","gravatar_id":"","url":"https://api.github.com/users/nmielnik","html_url":"https://github.com/nmielnik","followers_url":"https://api.github.com/users/nmielnik/followers","following_url":"https://api.github.com/users/nmielnik/following{/other_user}","gists_url":"https://api.github.com/users/nmielnik/gists{/gist_id}","starred_url":"https://api.github.com/users/nmielnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmielnik/subscriptions","organizations_url":"https://api.github.com/users/nmielnik/orgs","repos_url":"https://api.github.com/users/nmielnik/repos","events_url":"https://api.github.com/users/nmielnik/events{/privacy}","received_events_url":"https://api.github.com/users/nmielnik/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T23:24:35Z","updated_at":"2015-07-15T23:24:35Z","body":"![mediumeditor](https://cloud.githubusercontent.com/assets/2444240/8712185/1ed9688e-2b27-11e5-85ce-18299fb7b0fb.png)\r\n"}}