The code you are using should work correctly.
Please double check you have configured IE according to this article
A Jing video of the behavior may also help us diagnose your issue.
Could you also give us a direct access to the application so we can try to reproduce the issue?
Looking forward to hearing from you.