Event Handling with input & label Redux

Friday, October 12, 2007

This is a brief follow-up to Faulty Firing (see that post for the description of the tests) with updated results in the latest browsers.

Firefox 2.0.0.7 (Mozilla 1.8.1.7) & Firefox 3.0a9 (“Minefield”)

  1. mousedown, focus, mouseup, click, change
  2. focus, click, change
  3. blur, focus, click

Internet Explorer 7

  1. mousedown, focus, mouseup, click
  2. click, focus
  3. change, blur, click, focus

Safari 3.0.3 Beta

  1. mousedown, mouseup, change, click
  2. change, click
  3. click

Opera 9.5 Alpha

  1. mousedown, focus, mouseup, click, change
  2. focus, click, change
  3. blur, focus, click

Conclusions

Mozilla (Firefox) remains unchanged in the current release version and the experimental alpha. There’s something to be said for consistency, I suppose.

IE7 is also the same as IE6.

Safari 3 Beta brings label support, but is still lacking elsewhere. First, the focus event is still missing entirely from the first test (clicking directly on a radio button). Not surprisingly, the focus event isn’t fired in the other cases either. Clicking on the label directly fires the change event before the click event, going against all tested browsers except (the blood-related) Konqueror. Lastly, the click on label after input leaves off both focus-related events seen in other browsers, but does fire the click.

Opera’s model appears to have been completely updated. Previously it had troubles with strange order of events and some just missing. Now it imitates Mozilla’s behavior exactly.

Another fun day in the life of incompatible browsers.

written by Brad Fults

Archived at: http://h3h.net/2007/10/event-handling-with-input-label-redux/

1 response

  1. Keilaron

    Well, two out of four is good, even if the bend the rules a little, n’est-ce pas?

  2. Comment Preview