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

adding defensive check for existence of select2 on the target element during the document mousedown/touchend events

This commit is contained in:
Jason Purcell 2013-01-28 15:01:17 -05:00
parent 434827d22c
commit 56631aa09f

View File

@ -482,7 +482,7 @@ the specific language governing permissions and limitations under the Apache Lic
$document.bind("mousedown touchend", function (e) {
var target = $(e.target).closest("div.select2-container").get(0), attr;
var targetDropdown = null;
if (target) {
if (target && $(target).data("select2") ) {
$document.find("div.select2-container-active").each(function () {
if (this !== target) $(this).data("select2").blur();
});