support cross domain and fix messages input bug