{"action":"created","issue":{"url":"https://api.github.com/repos/alexgorbatchev/jquery-textext/issues/199","repository_url":"https://api.github.com/repos/alexgorbatchev/jquery-textext","labels_url":"https://api.github.com/repos/alexgorbatchev/jquery-textext/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/alexgorbatchev/jquery-textext/issues/199/comments","events_url":"https://api.github.com/repos/alexgorbatchev/jquery-textext/issues/199/events","html_url":"https://github.com/alexgorbatchev/jquery-textext/issues/199","id":142673006,"number":199,"title":"Validate on blur","user":{"login":"wsalame","id":8709555,"avatar_url":"https://avatars.githubusercontent.com/u/8709555?v=3","gravatar_id":"","url":"https://api.github.com/users/wsalame","html_url":"https://github.com/wsalame","followers_url":"https://api.github.com/users/wsalame/followers","following_url":"https://api.github.com/users/wsalame/following{/other_user}","gists_url":"https://api.github.com/users/wsalame/gists{/gist_id}","starred_url":"https://api.github.com/users/wsalame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsalame/subscriptions","organizations_url":"https://api.github.com/users/wsalame/orgs","repos_url":"https://api.github.com/users/wsalame/repos","events_url":"https://api.github.com/users/wsalame/events{/privacy}","received_events_url":"https://api.github.com/users/wsalame/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-03-22T14:47:26Z","updated_at":"2016-08-22T20:31:39Z","closed_at":"2016-08-22T20:31:39Z","body":"Instead of having to press Enter, is there a way to add the tag on the blur of the widget ? I managed to bind the blur event, but I can't figure out which function to call after that."},"comment":{"url":"https://api.github.com/repos/alexgorbatchev/jquery-textext/issues/comments/241540369","html_url":"https://github.com/alexgorbatchev/jquery-textext/issues/199#issuecomment-241540369","issue_url":"https://api.github.com/repos/alexgorbatchev/jquery-textext/issues/199","id":241540369,"user":{"login":"wsalame","id":8709555,"avatar_url":"https://avatars.githubusercontent.com/u/8709555?v=3","gravatar_id":"","url":"https://api.github.com/users/wsalame","html_url":"https://github.com/wsalame","followers_url":"https://api.github.com/users/wsalame/followers","following_url":"https://api.github.com/users/wsalame/following{/other_user}","gists_url":"https://api.github.com/users/wsalame/gists{/gist_id}","starred_url":"https://api.github.com/users/wsalame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wsalame/subscriptions","organizations_url":"https://api.github.com/users/wsalame/orgs","repos_url":"https://api.github.com/users/wsalame/repos","events_url":"https://api.github.com/users/wsalame/events{/privacy}","received_events_url":"https://api.github.com/users/wsalame/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T20:31:39Z","updated_at":"2016-08-22T20:31:39Z","body":"Thanks ! Another workaround I ended up doing\r\n\r\n```\r\n$('#' + id).blur(defaultValue, function(e) {\r\n      pressEnterKeyProgrammatically('#' + id, e.data);\r\n});\r\n\r\nfunction pressEnterKeyProgrammatically(selector, defaultValue) {\r\n      if (defaultValue != $(selector).val() && $(selector).val() != '') {\r\n        $(selector).trigger('enterKeyPress').val('');\r\n\r\n        $(selector).off('blur'); //To avoid infine blur loop in Chrome\r\n        $(selector).blur();\r\n\r\n        $(selector).blur(defaultValue, function(e) {\r\n          pressEnterKeyProgrammatically(selector, e.data);\r\n        });\r\n      }\r\n    }\r\n```"}}
{"actor":{"display_login":"wsalame"}}