State of JSInput now conserved when save button is clicked.

@polesye @auraz Please review.