From 31101764ff0515e78d49a00a19e0290adb8fc266 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Fri, 1 Mar 2013 00:54:11 -0800 Subject: [PATCH] add missing element prop to data. fix #936 --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 2ddbd2ba..39b582be 100644 --- a/select2.js +++ b/select2.js @@ -1946,7 +1946,7 @@ the specific language governing permissions and limitations under the Apache Lic this.select .val(val) .find(":selected").each2(function (i, elm) { - data = {id: elm.attr("value"), text: elm.text()}; + data = {id: elm.attr("value"), text: elm.text(), element: elm.get(0)}; return false; }); this.updateSelection(data);