myforce / angularjs-dropdown-multiselect

AngularJS Dropdown Multiselect
http://myforce.github.io/angularjs-dropdown-multiselect/
MIT License
34 stars 28 forks source link

event.srcElement non-standard #11

Closed neemanjabu closed 8 years ago

neemanjabu commented 8 years ago

Functions keyDownLink and keyDownSearchDefault relies on event.srcElement property which is non-standard and causes JS errors. event.target should be used here.

https://developer.mozilla.org/en-US/docs/Web/API/Event/srcElement

neemanjabu commented 8 years ago

Problem is that jQuery does not copy srcElement property from originalEvent to jQuery Event object. Quick fix would be to add srcElement to jQuery Event object using fixHooks.

$.event.fixHooks.keydown = {
    props: [ "srcElement" ]
};
pkempenaers commented 8 years ago

Thanks for notifying me, I'll take a look at this, this afternoon

Shouvikg commented 8 years ago

thanks neemanjabu. you saved my day. that change in source code helped me a lot. i was facing this javascript error.

pkempenaers commented 8 years ago

Hi,

Once again thank you for bringing this to my attention, this has been resolved in versions: 1.7.3, 1.8.2 and 1.9.1 (and higher)