Bugfix: speculativelyValidate called on a text node would result in an infinite loop.
Browser compatibility issue: see comments but basically Chrome behaves differently from other browsers on mouseup and click regarding when the caret is updated.
Setting ev must be done before calling the timeout function.