Safari hanging on password input creation

Fix #3997