- From: Aryeh Gregor <Simetrical+w3c@gmail.com>
- Date: Fri, 8 Apr 2011 15:05:05 -0400
- To: Glenn Maynard <glenn@zewt.org>
- Cc: www-dom@w3.org
On Thu, Apr 7, 2011 at 9:46 PM, Glenn Maynard <glenn@zewt.org> wrote: > The onchange event is only fired when an element loses focus. This > optimization may have made sense when Javascript engines were so slow that > running scripts on each input was a bad idea, but it's a hassle now. I don't think it's an optimization. (We always had keypress, right?) It's for cases where you actually want to only do something when the input loses focus. It's great for form validation, for example -- you don't want to complain that the value is wrong before they've finished typing it, nor if they were only tabbing through so it blurs but they didn't change the value.
Received on Friday, 8 April 2011 19:05:53 UTC