Fix some bug for CursorTextField, and let UIEventDispatcher only availiable in WIN32.