diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index f70049c7c..1102e6372 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -185,6 +185,7 @@ - **Dropdown** - Fixed issue with matching boolean values, and using `set selected` with `true` or `false` - **Dropdown** - Fixed `search dropdown` submitting parent form when enter shortcut pressed - **Dropdown** - Fixed dropdown menu items should not center inside of a center aligned container. +- **Dropdown** - Fixed some cases where onChange would not occur for values matching equality against '', for example `0` - **Form** - Form will no longer set a height for `textarea` using the `rows` property - **Form** - `inline fields` are now `1em` and do not match label's reduced size - **Form** - `field` inside `fields` no longer produce double sized margins. diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index daf26072e..b9ac976a9 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -2040,10 +2040,13 @@ $.fn.dropdown = function(parameters) { hasInput = ($input.length > 0), isAddition = !module.has.value(value), currentValue = module.get.values(), + stringValue = (typeof value == 'number') + ? value.toString() + : value, newValue ; if(hasInput) { - if(value == currentValue) { + if(stringValue == currentValue) { module.verbose('Skipping value update already same value', value, currentValue); if(!module.is.initialLoad()) { return;