gfranko / jquery.selectBoxIt.js

A jQuery Select Box Plugin for Mobile, Tablet, and Desktop
http://www.selectboxit.com
MIT License
852 stars 301 forks source link

Cannot select options on safari 13.2 #399

Open BernardCooley opened 4 years ago

BernardCooley commented 4 years ago

On iPhones and iPads running safari 13.2, when i select the dropdown and try to click on one of the options. It doesnt do anything. It works on all other devices/browsers.

Im implementing in the following manner.

var $customSelectBox = $(".js-macmillan-form").find("select");

$.each($customSelectBox, function () {
    var device = navigator.userAgent || navigator.vendor || window.opera;

    if (/iPhone|iPod|iPad/.test(device)) {
        $(this).selectBoxIt({
            native: true,
        });
    } else {
        $(this).selectBoxIt();
    }

    $(this).on("change", function () {
        $(".js-macmillan-form").validate().element($(this));
        if ($(this).val() === "") {
            $(this).closest(".row").addClass("error");
        }
    });
});