Search code examples
javascriptjqueryhtmlsamsung-mobile

Closing samsung's mobile browser "select dropdown popup"


When on the samsung mobile browser and wanting to select something from a html select/dropdown, samsung popup's it's own variation of the dropdown options with the "previous, next and ready" buttons. On other browsers you simply get a list with options, and when you selected an option the popup will disappear. However with the samsung browser you have to press the "ready" button first before it closes. I find this annoying and want it to close after an option has been selected.

I tried using an jQuery onchange function and de-focus the select box, i hoped it would disappear as it would when the focus is on a text field.

enter image description here

$("#selectbox").on('change', function(){
    this.blur();
});

I would expect the popup with the select options to disappear, but it doesn't. I am not looking for a configuration in the browser itself which disables this "i won't close function", but rather something with jQuery or javascript if possible.


Solution

  • Seems this is a working option:

    $("#selector1").on('change', function(){
        var select = $(this).clone();
        $(this).replaceWith(select);
    });
    

    I still wonder if there is a more gracefully possibility before accepting my own answer.