Fix failing test in IE.

element.click() only works when element is in the document.
Merge pull request #446 from arv/add-during-dispatch-ie

Fix failing test in IE.