js bug fixed, set blur on element before the callback