Drowpdown doesn't fire the onChange event with keydown if selectedOptions is null
[x] bug report => Search github for a similar issue or PR before submitting [ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap [ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.
http://plnkr.co/edit/Qi2Nw2imLpDUF8NJinYw?p=preview
Current behavior When dropdown is focus, and have items, when I press the down-arrow to select one item the "onKeydown(event) is fired up, but the selectedOption is null, so variable seletedItemIndex is -1 and assign to selectedOption with this.optionsToDisplay[0], but don't call method "selectItem(event, option) and don't fire up the onChange emitter.
Expected behavior Must fire up the event onChange when push down-arrow when the selectedOption is null
Minimal reproduction of the problem with instructions In the dropdown demo page, in the single example happens, set focus on the first dropdown, and push the down arrow, but the "Selected City" label don't change and if with the mouse you try to select the same item, doesn't select because is the same item.
What is the motivation / use case for changing the behavior? Is a bug, I think.
Please tell us about your environment: windows 7, visual studio code
-
Angular version: 4.0.0
-
PrimeNG version: 4.1.0-rc.3",
-
Browser: I'll tested in chrome
-
Language: es5, typescript 2.20
-
Node (for AoT issues): 7.8.0
This issue appears after this commit https://github.com/primefaces/primeng/commit/d000290843a95ef47b612bfbd53c494ada891fbe
The change is fired with mouse but not with keyboard because when press up or down key the selected option is assigned therefore when the selected option is compared with the new option they are already equals.

Should be fixed already, try with 4.1.3 please.