In both IE and Chrome the input does not get focus like the code says it should. this is because it's using
win.children("input.messager-input").focus();
which only gets direct decedents, and the input is inside a <div>. Changing to
win.find("input.messager-input").focus();
works.