{"action":"opened","issue":{"url":"https://api.github.com/repos/Dykin/Nodjs/issues/1","repository_url":"https://api.github.com/repos/Dykin/Nodjs","labels_url":"https://api.github.com/repos/Dykin/Nodjs/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Dykin/Nodjs/issues/1/comments","events_url":"https://api.github.com/repos/Dykin/Nodjs/issues/1/events","html_url":"https://github.com/Dykin/Nodjs/issues/1","id":132717340,"number":1,"title":"can someone help me out with this no text in input is no enter ","user":{"login":"Dykin","id":16672070,"avatar_url":"https://avatars.githubusercontent.com/u/16672070?v=3","gravatar_id":"","url":"https://api.github.com/users/Dykin","html_url":"https://github.com/Dykin","followers_url":"https://api.github.com/users/Dykin/followers","following_url":"https://api.github.com/users/Dykin/following{/other_user}","gists_url":"https://api.github.com/users/Dykin/gists{/gist_id}","starred_url":"https://api.github.com/users/Dykin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dykin/subscriptions","organizations_url":"https://api.github.com/users/Dykin/orgs","repos_url":"https://api.github.com/users/Dykin/repos","events_url":"https://api.github.com/users/Dykin/events{/privacy}","received_events_url":"https://api.github.com/users/Dykin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-10T14:45:01Z","updated_at":"2016-02-10T14:45:01Z","closed_at":null,"body":"\t$(\"#sendMessageTextBox\").keypress(function(event)\r\n\t{\r\n\t\tif (event.which == 13) {\r\n\t\t\tevent.preventDefault();\r\n\t\t\t$(\"#messageForm\").submit();\r\n\t\t}\r\n\t}).on('keydown', function(e) {\r\n\t\tvar $this = $(this);\r\n\t\tif (e.keyCode == 9 && $this.val().length > 0) {\r\n\t\t\te.preventDefault();\r\n\t\t\t\r\n\t\t\tif (!isSuggestingUser) {\r\n\t\t\t\tvar currentPos = $this.getCursorPosition();\r\n\t\t\t\tvar fromBeginStr = $this.val().slice(0, currentPos);\r\n\t\t\t\tvar strParts = fromBeginStr.split(' ');\r\n\t\t\t\tif (strParts.length > 0) {\r\n\t\t\t\t\tvar currentWord = strParts[strParts.length - 1];\r\n\t\t\t\t\tsuggestingUsers = channelUsers.filter(function(value) {\r\n\t\t\t\t\t\treturn value.nickname.toLowerCase().startsWith(currentWord.toLowerCase());\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (suggestingUsers.length > 0) {\r\n\t\t\t\t\t\tbeginPart = $this.val().slice(0, currentPos - currentWord.length);\r\n\t\t\t\t\t\tif ($this.val().length > currentPos + currentWord.length){\r\n\t\t\t\t\t\t\tafterPart = $this.val().slice(currentPos + currentWord.length);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$this.val(beginPart + suggestingUsers[currentSuggestingIndex].nickname + afterPart);\r\n\t\t\t\t\t\tcurrentSuggestingIndex++;\r\n\t\t\t\t\t\tisSuggestingUser = true;\r\n\t\t\t\t\t\tif (currentSuggestingIndex > suggestingUsers.length) currentSuggestingIndex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (suggestingUsers.length == 0) return;\r\n\t\t\t\tif (suggestingUsers.length > 0 && !suggestingUsers[currentSuggestingIndex]) {\r\n\t\t\t\t\tcurrentSuggestingIndex = 0;\r\n\t\t\t\t}\r\n\t\t\t\t$this.val(beginPart + suggestingUsers[currentSuggestingIndex].nickname + afterPart);\r\n\t\t\t\tcurrentSuggestingIndex++;\r\n\t\t\t\tif (currentSuggestingIndex > suggestingUsers.length) currentSuggestingIndex = 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tisSuggestingUser = false;\r\n\t\t\tsuggestingUsers = [];\r\n\t\t\tcurrentSuggestingIndex = 0;\r\n\t\t}\r\n\t});\r\n\t\r\n"}}