setSelection jQuery plugin issue (JavaScript)
<p>I've been trying to build an "auto-complete" function for time input using setSelection jquery plugin.  Everything seems fine except for the fact that when I try to input time like "1:00AM" the setSelection script selects it and then unselects it for some strange reason. If I throw an alert anywhere in the function, it also works well.  I tried some time delays but to no avail.  Everything else works just fine.  Has anybody worked with setSelection before and encountered similar issue?  </p>

<p>Any ideas would be very welcome. 
Here is the link to the problematic script: <a href="https://www.findyournet.com/test/input.html" rel="nofollow">https://www.findyournet.com/test/input.html</a></p>
