drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.39k stars 1.63k forks source link

Different behaviour Safari on MacOS #370

Open ma9ma opened 7 years ago

ma9ma commented 7 years ago

I have this piece of code

   $('input[id="tmpCheck"]').on('ifClicked', function (event) {
         $('input[id="tmpCheck"]').iCheck('toggle');
        document.getElementById("tmpForm").submit();
    });

for checking the state of this inputfield

<input type="checkbox" name="var" id="tmpCheck" value="1"<?php if($va == 1) { echo ' checked'; } ?>><label for="tmpcheck">Text line</label>

If I click on the checkbox to activate it, the checkbox is first activated on Chrome, Firefox and Opera and after that de form is submitted. On Safari (MacOS) however first the form is submitted and the checkbox is checked only after the submit. How to solve this?