From 8bab0b6f70a85a893aebe4d065da25c4a6173431 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 16 Aug 2012 00:09:00 -0700 Subject: [PATCH] always set the val on element so initSelection has access to it. fixes #337 --- select2.js | 1 + 1 file changed, 1 insertion(+) diff --git a/select2.js b/select2.js index 07ea111d..9abfb5b8 100755 --- a/select2.js +++ b/select2.js @@ -1691,6 +1691,7 @@ this.clear(); return; } + this.opts.element.val(val); this.opts.initSelection(this.opts.element, function(data){ self.opts.element.val(!data ? "" : self.id(data)); self.updateSelection(data);