update on js input event (fixes issue #29)