Fixed regression: the caret position lost.

Such a usecase will lost caret position:
  - Edit TEXTAREA field, input some character
  - Edit PASSWORD field
  - Edit TEXTAREA field again, the caret lost.