From 0a283eacb8bf741d479dee919e2afb8eb5fb210a Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 25 Mar 2013 23:39:37 +0100 Subject: [PATCH] FIX Unset internal metadata on TreeDropdownField setValue() Otherwise the hidden field value and metadata will get out of sync. Most commonly used together with setTitle('') as well. --- javascript/TreeDropdownField.js | 1 + 1 file changed, 1 insertion(+) diff --git a/javascript/TreeDropdownField.js b/javascript/TreeDropdownField.js index 7eeb01773..45b5afb5c 100644 --- a/javascript/TreeDropdownField.js +++ b/javascript/TreeDropdownField.js @@ -124,6 +124,7 @@ else this.loadTree(null, updateFn); }, setValue: function(val) { + this.data('metadata', $.extend(this.data('metadata'), {id: val})); this.find(':input:hidden').val(val).trigger('change'); }, getValue: function() {