select menu widgets does not reset selectedIndex when recreated.

select menu widgets does not reset selectedIndex when recreated.

Hi,
In our JQM application, we recreate option lists for a select menu widgets, but the selected index does not reset to -1 when options are recreated. there is demo


<div data-role="content">
        <input type="button" value="click to test" onclick="test();"> </input>
            <select id="sel-test">
            </select>
        
        </div>
function test(){
        $("#sel-test").empty();
        for(var i = 1;i <10; i++){
            var opt = "<option value='"+i+"' > " + i + "</option>";
            $("#sel-test").append($(opt));
        }
}
$(document).ready(function() {
for(var i = 1;i <3; i++){
            var opt = "<option value='"+i+"' > " + i + "</option>";
            $("#sel-test").append($(opt));
        }
});//end for document.ready