Correctly render input elements' state when manipulated through script operations