It's not a typo. It's javascript :-)

the bind(b) make sure that if you use this inside onclick handler, it
points to the submitting instance, just like it would if you clicked
the button.

The entire code is to make sure that default button works for ajax
buttons too (as the implementation before just submitted the entire
form regularly).

-Matej

On 9/11/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> On 9/10/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
> > Hi Eelco,
> >
> > Keyboard actions on components can actually trigger an onClick on the
> > component.
> >
> > I had javascript rendering problems in IE with a checkbox with an
> > onChange that changed an img src. The src of the image would be changed,
> > but IE just refused to update the screen. When I changed the onChange to
> > onClick, suddenly IE did work. However, the point is, that you would
> > expect onChange to fire when you change the value of the checkbox with
> > the keyboard, whereas you would expect onClick not to. However in ALL
> > browsers I tested, changing the value of the checkbox with the keyboard
> > ALSO triggered onClick.
>
> Ah, thanks for explaining Sebastiaan.
>
> what about this: b.onclick.bind(b)() ?
>
> Eelco
>

Reply via email to