Tuesday, November 20, 2007

Firefox doesn’t get events right, especially on the Mac

When a form field is loosing the focus, the browser is supposed to send two events: blur and change. The latter is only sent if the you have changed the value of the field. When you change the value of a first field and tab to a second field, all the browsers get the events right. But if you change the value of a first field, alt-tab to another application, alt-tab back to the browser, and tab to the second field, then different browsers implement different behaviors:
  • IE 7 implements this "correctly", i.e. as if the alt-tabs between the browser and the other application were not there.
  • Firefox 2 on Windows sends a change event when you alt-tab away from Firefox, and then doesn't send the change event when you tab to the second field. This is not what I would expect, but it isn't terribly incorrect either.
  • Firefox 2 on Mac never sends the change event. That is just plain wrong.
If you are using XForms to define your forms and running them through Orbeon Forms you won't have to deal with any of this. Orbeon Forms will do the hard work for you. Lucky you! ;)

No comments:

Post a Comment