Fomantic-UI
Fomantic-UI copied to clipboard
[Dropdown] JavaScript error when adding to dropdwon while hideAdditions = false
Bug Report
when allowAdditions is true and hideAdditions is false , Javascript error occurs when clicking the new added label

Steps to reproduce
- create a new dropdown with options
{ allowAdditions: true, hideAdditions: false} - add a new option
- click the new added option
- see the error
Expected result
shouldn't get an error
Actual result
Uncaught TypeError: Cannot read property 'trim' of undefined
Testcase
http://jsfiddle.net/kamalkemo/bwhsrvdf/
Screenshot (if possible)

Version
2.8.7
The bug is caused because fomantic does:
- Handles click event and deletes user addition
- Handles
forceSelectionfunction and calls click again
The problem is when forceSelection calls click again user addition is already deleted by the first click event.
If forceSelection is set to false, no error is shown.
Fixed by #1681
Looks great , Thanks!