Use aloha api to place cursor

Seems the bug I was chasing is a firefox bug.