valor-software / ng2-select

Angular based replacement for select boxes
http://valor-software.github.io/ng2-select/
MIT License
675 stars 587 forks source link

Error during evaluation of "keyup" e.srcElement is undefined #27

Open neridonk opened 8 years ago

neridonk commented 8 years ago

I tried to use this but i get :

EXCEPTION: Error during evaluation of "keyup" angular2.dev.js:23514:9

ORIGINAL EXCEPTION: TypeError: e.srcElement is undefined angular2.dev.js:23514:9

ORIGINAL STACKTRACE: angular2.dev.js:23514:9

Select.prototype.mainClick@http://localhost:5555/node_modules/ng2-select/components/select/select.js:101:9 anonymous/ChangeDetector_Select_1.prototype.handleEventInternal@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js line 10897 > Function:432:18 AbstractChangeDetector</AbstractChangeDetector.prototype.handleEvent@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:8788:17 AppView</AppView.prototype.dispatchEvent@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:9396:19 AppView</AppView.prototype.dispatchRenderEvent@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:9391:14 DefaultRenderView</DefaultRenderView.prototype.dispatchRenderEvent@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:7819:32 createRenderView/eventDispatcher@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:9781:14 createEventHandler/<@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:9852:14 decoratePreventDefault/<@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:15370:34 DomEventsPlugin</DomEventsPlugin.prototype.addEventListener/outsideHandler/<@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:7874:18 run@http://localhost:5555/node_modules/angular2/bundles/angular2-polyfills.js:138:14 NgZone</NgZone.prototype._createInnerZone/<.$run/<@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:5719:22 NgZone</NgZone.prototype.run@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:5681:18 DomEventsPlugin</DomEventsPlugin.prototype.addEventListener/outsideHandler@http://localhost:5555/node_modules/angular2/bundles/angular2.dev.js:7873:1 run@http://localhost:5555/node_modules/angular2/bundles/angular2-polyfills.js:138:14 zoneBoundFn@http://localhost:5555/node_modules/angular2/bundles/angular2-polyfills.js:111:14 angul

neridonk commented 8 years ago

you have to replace the e.srcElement to e.target in select.ts