some fixes for multiple-mode textinput

#4258 
Fixed.