Merge pull request #3346 from mateusz/tdf-synthetic

BUG Add a synthetic event to workaround IE8 issues.
This commit is contained in:
Damian Mooyman 2014-07-31 17:28:06 +12:00
commit c93e752abe

View File

@ -173,7 +173,11 @@
},
setValue: function(val) {
this.data('metadata', $.extend(this.data('metadata'), {id: val}));
this.find(':input:hidden').val(val).trigger('change');
this.find(':input:hidden').val(val)
// Trigger synthetic event so subscribers can workaround the IE8 problem with 'change' events
// not propagating on hidden inputs. 'change' is still triggered for backwards compatiblity.
.trigger('valueupdated')
.trigger('change');
},
getValue: function() {
return this.find(':input:hidden').val();