Posts

Post not yet marked as solved
0 Replies
309 Views
I have a select element and a input element like this: <html> <head> <script> $(document).ready(function(){ $("#sel").change(function(e){ $("#txt").focus(); }); $("#txt").focusout(function(e){ $("#sel").val("1"); }); }); </script> </head> <body> <select id="sel" style="width:50px;"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <br/> <input id="txt" name="input" style="width: 100px;"> </body> </html> change the option value to 2, then the option value is 1. The expected value is 2. mobile safari fires focusout event of active element when the change event occurs.
Posted
by suzumi.
Last updated
.