From e7bd3a3779ad5e00f8e2edad877c1b2c98e2a10f Mon Sep 17 00:00:00 2001 From: Alek Storm Date: Wed, 27 Nov 2013 17:07:37 -0600 Subject: [PATCH] Only pick up direct children when retrieving data in 'multiple' mode: Prevents accidentally returning the selected items of any select2's embedded in the HTML of this selection's items. --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 9cd97cf5..29a634aa 100644 --- a/select2.js +++ b/select2.js @@ -3123,7 +3123,7 @@ the specific language governing permissions and limitations under the Apache Lic var self=this, ids, old; if (arguments.length === 0) { return this.selection - .find(".select2-search-choice") + .children(".select2-search-choice") .map(function() { return $(this).data("select2-data"); }) .get(); } else {