[jsr-314-open] FYI: onchange for radio and checkbox
Martin Marinschek
mmarinschek at apache.org
Wed Aug 12 17:45:37 EDT 2009
Hi Jim,
that is a well-known bug of IE - no way around this. AFAIK, all
component libraries with AJAX support do it exactly the same way - use
onclick for radios and checkboxes.
regards,
Martin
On 8/12/09, Jim Driscoll <Jim.Driscoll at sun.com> wrote:
> Just an FYI.
>
> Previously, in Mojarra, the default ajax behavior for components that
> rendered radio and checkbox was onchange.
>
> Unfortunately, this doesn't work in the way any user would expect in IE
> - the onchange event will not fire until the component loses focus.
> This makes it pretty much useless, as a user will click on a radio
> button then wonder why nothing is happening. Note that all other
> browsers fire the onchange event when you'd expect - without waiting for
> a blur event first.
>
> So, in the interests of making all browsers behave similarly, I've
> changed the default behavior to onclick for those components. Now, when
> you click on a radio or checkbox, the event will fire immediately.
> Sadly, this means that we'll now also fire events even when the value
> isn't changed (such as clicking multiple times on the same radio
> button). In general, most application developers shouldn't notice the
> difference, but it's conceivable that it might trip someone up at some
> point. The alternative, adding an onclick="this.blur();", seemed more
> likely to add problems than a simple change from onchange to onclick.
>
> Just wanted to let you know where we stood with this. As always,
> comments appreciated.
>
> Jim
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
More information about the jsr-314-open-mirror
mailing list