The problem comes when the text input has an onchange js event, because both "clear" and the "sendKeys" trigger the onchange event. This means, I can't avoid it being called twice. When I use firefox ...