Skip to content

Commit e7bd3a3

Browse files
committed
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.
1 parent 0967c67 commit e7bd3a3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3123,7 +3123,7 @@ the specific language governing permissions and limitations under the Apache Lic
31233123
var self=this, ids, old;
31243124
if (arguments.length === 0) {
31253125
return this.selection
3126-
.find(".select2-search-choice")
3126+
.children(".select2-search-choice")
31273127
.map(function() { return $(this).data("select2-data"); })
31283128
.get();
31293129
} else {

0 commit comments

Comments
 (0)