Explorar o código

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.
Alek Storm %!s(int64=11) %!d(string=hai) anos
pai
achega
e7bd3a3779
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      select2.js

+ 1 - 1
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 {