jquery.customSelect icon indicating copy to clipboard operation
jquery.customSelect copied to clipboard

Safari Autofill not updating selection value

Open tsantor opened this issue 10 years ago • 1 comments

When autofilling a credit card form with Safari, the selected values that display to the user in the "faked" dropdown span class="customSelect" are not accurate. If I click on the dropdown the correct value is checked in the option list, but the customSelect instance is not updated/refreshed with the correct value. I must choose another value, then my original value for it to update.

tsantor avatar Apr 15 '14 16:04 tsantor

For anyone who's interested, I came up with a solution outside of jquery.customSelect in order to get the desired behavior when a form is autofilled. Since I know autofill fill in at least the first name field I trigger an 'change' event to fire which in turn makes customSelect update its span values.

 $('#id_first_name').on('blur', function() {
     // fix for jquery custom select bug when autofilling
     $('select').trigger('change');
});

tsantor avatar Apr 15 '14 17:04 tsantor