1
0
mirror of synced 2024-11-22 21:16:10 +03:00

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.
This commit is contained in:
Alek Storm 2013-11-27 17:07:37 -06:00
parent 0967c67776
commit e7bd3a3779

View File

@ -3123,7 +3123,7 @@ the specific language governing permissions and limitations under the Apache Lic
var self=this, ids, old; var self=this, ids, old;
if (arguments.length === 0) { if (arguments.length === 0) {
return this.selection return this.selection
.find(".select2-search-choice") .children(".select2-search-choice")
.map(function() { return $(this).data("select2-data"); }) .map(function() { return $(this).data("select2-data"); })
.get(); .get();
} else { } else {