Fix for https://webarchive.jira.com/browse/ARI-3752

Rewrite onchange event handler.