Tweaked event-handling on input fields.