{"action":"opened","issue":{"url":"https://api.github.com/repos/Gbuomprisco/ng2-tag-input/issues/41","repository_url":"https://api.github.com/repos/Gbuomprisco/ng2-tag-input","labels_url":"https://api.github.com/repos/Gbuomprisco/ng2-tag-input/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/Gbuomprisco/ng2-tag-input/issues/41/comments","events_url":"https://api.github.com/repos/Gbuomprisco/ng2-tag-input/issues/41/events","html_url":"https://github.com/Gbuomprisco/ng2-tag-input/issues/41","id":173494767,"number":41,"title":"Error when attempting to use the autocomplete function","user":{"login":"sspringer","id":826527,"avatar_url":"https://avatars.githubusercontent.com/u/826527?v=3","gravatar_id":"","url":"https://api.github.com/users/sspringer","html_url":"https://github.com/sspringer","followers_url":"https://api.github.com/users/sspringer/followers","following_url":"https://api.github.com/users/sspringer/following{/other_user}","gists_url":"https://api.github.com/users/sspringer/gists{/gist_id}","starred_url":"https://api.github.com/users/sspringer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sspringer/subscriptions","organizations_url":"https://api.github.com/users/sspringer/orgs","repos_url":"https://api.github.com/users/sspringer/repos","events_url":"https://api.github.com/users/sspringer/events{/privacy}","received_events_url":"https://api.github.com/users/sspringer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-26T16:41:24Z","updated_at":"2016-08-26T16:41:24Z","closed_at":null,"body":"I've run into an issue with the control on my form when attempting to use the autocomplete function.  The error below is thrown whenever a key has been pressed in the control.\r\n\r\nI set a break point on the first line of the handleKeypress method in ng2-dropdown-menu.ts (line 106).  When that break point is hit, `this` is undefined, so `this.state` is undefined.\r\n\r\n\r\n`EXCEPTION: TypeError: Cannot read property 'state' of undefined\r\nplatform-browser.umd.js:937 \r\nEXCEPTION: TypeError: Cannot read property 'state' of undefinedBrowserDomAdapter.logError \r\n  @ platform-browser.umd.js:937BrowserDomAdapter.logGroup \r\n  @ platform-browser.umd.js:947ExceptionHandler.call \r\n  @ core.umd.js:4389next \r\n  @ core.umd.js:9971schedulerFn \r\n  @ core.umd.js:9168SafeSubscriber.__tryOrUnsub \r\n  @ Subscriber.ts:240SafeSubscriber.next \r\n  @ Subscriber.ts:192Subscriber._next \r\n  @ Subscriber.ts:133Subscriber.next \r\n  @ Subscriber.ts:93Subject._finalNext \r\n  @ Subject.ts:154Subject._next \r\n  @ Subject.ts:144Subject.next \r\n  @ Subject.ts:90EventEmitter.emit \r\n  @ core.umd.js:9156onError \r\n  @ core.umd.js:9394onHandleError \r\n  @ core.umd.js:9266ZoneDelegate.handleError \r\n  @ zone.js:327Zone.runGuarded \r\n  @ zone.js:233NgZoneImpl.runInnerGuarded @ core.umd.js:9278NgZone.runGuarded @ core.umd.js:9510outsideHandler @ platform-browser.umd.js:1913ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256ZoneTask.invoke @ zone.js:423\r\nplatform-browser.umd.js:937 STACKTRACE:BrowserDomAdapter.logError @ platform-browser.umd.js:937ExceptionHandler.call @ core.umd.js:4391next @ core.umd.js:9971schedulerFn @ core.umd.js:9168SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ core.umd.js:9156onError @ core.umd.js:9394onHandleError @ core.umd.js:9266ZoneDelegate.handleError @ zone.js:327Zone.runGuarded @ zone.js:233NgZoneImpl.runInnerGuarded @ core.umd.js:9278NgZone.runGuarded @ core.umd.js:9510outsideHandler @ platform-browser.umd.js:1913ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256ZoneTask.invoke @ zone.js:423\r\nplatform-browser.umd.js:937 TypeError: Cannot read property 'state' of undefined\r\n    at Ng2DropdownMenu.handleKeypress (ng2-dropdown-menu.ts:106)\r\n    at eval (platform-browser.umd.js:1836)\r\n    at eval (platform-browser.umd.js:1913)\r\n    at ZoneDelegate.invoke (zone.js:323)\r\n    at Object.onInvoke (core.umd.js:9245)\r\n    at ZoneDelegate.invoke (zone.js:322)\r\n    at Zone.runGuarded (zone.js:230)\r\n    at NgZoneImpl.runInnerGuarded (core.umd.js:9278)\r\n    at NgZone.runGuarded (core.umd.js:9510)\r\n    at HTMLBodyElement.outsideHandler (platform-browser.umd.js:1913)BrowserDomAdapter.logError @ platform-browser.umd.js:937ExceptionHandler.call @ core.umd.js:4392next @ core.umd.js:9971schedulerFn @ core.umd.js:9168SafeSubscriber.__tryOrUnsub @ Subscriber.ts:240SafeSubscriber.next @ Subscriber.ts:192Subscriber._next @ Subscriber.ts:133Subscriber.next @ Subscriber.ts:93Subject._finalNext @ Subject.ts:154Subject._next @ Subject.ts:144Subject.next @ Subject.ts:90EventEmitter.emit @ core.umd.js:9156onError @ core.umd.js:9394onHandleError @ core.umd.js:9266ZoneDelegate.handleError @ zone.js:327Zone.runGuarded @ zone.js:233NgZoneImpl.runInnerGuarded @ core.umd.js:9278NgZone.runGuarded @ core.umd.js:9510outsideHandler @ platform-browser.umd.js:1913ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256ZoneTask.invoke @ zone.js:423\r\nzone.js:260 Uncaught TypeError: Cannot read property 'state' of undefinedNg2DropdownMenu.handleKeypress @ ng2-dropdown-menu.ts:106(anonymous function) @ platform-browser.umd.js:1836(anonymous function) @ platform-browser.umd.js:1913ZoneDelegate.invoke @ zone.js:323onInvoke @ core.umd.js:9245ZoneDelegate.invoke @ zone.js:322Zone.runGuarded @ zone.js:230NgZoneImpl.runInnerGuarded @ core.umd.js:9278NgZone.runGuarded @ core.umd.js:9510outsideHandler @ platform-browser.umd.js:1913ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256ZoneTask.invoke @ zone.js:423\r\n`"}}
{"actor":{"display_login":"sspringer"}}