vestman / Select-or-Die

Yet another jQuery plugin to style select elements. Demo at http://vst.mn/selectordie/
MIT License
524 stars 133 forks source link

placeholderOption & placeholder breaks SOD on mobile devices #22

Open PawelGIX opened 9 years ago

PawelGIX commented 9 years ago

placeholderOption & placeholder settings don't allow me chose any option. When field lose focus widget back to placeholder. Tested on android & chrome emulator

vestman commented 9 years ago

Sorry for the late reply, @PawelGIX.

I'm aware of this issue. The actual tapped value is still selected, it's just the placeholder that doesn't update correctly. I'll take a look at it during the weekend!

plapcity commented 9 years ago

Are there any updates on this issue? Seeing it happen on my site.

socki03 commented 8 years ago

I managed to "fix" this with a jQuery change function outside the initial SoD call. Please, if you see a better way to do this or refactor it, feel free, this was my quick 10 minute fix:

$('.sod_select.touch .sod').change(function() {
    var newValue = $(this).find('option:selected').val();
    $('.sod_option.selected.active').removeClass('selected active');
    $('.sod_option[data-value="'+newValue+'"]').addClass('selected active');
});

Note that .sod was the class I'd added to my SoD selects

joekla commented 4 years ago

@jherencia has fixed this issue #21