Details
Description
JavaScript error when radio button has focus and return key is pressed:
IE6 and IE7 report a script error ("'onclick' is null or not an object"), which IMHO may be fixed in method
- protected void org.apache.wicket.markup.html.form.Form.appendDefaultButtonField(final MarkupStream markupStream, final ComponentTag openTag)
on line:
buffer.append("'); if (typeof(b.onclick) != 'undefined')
{ var r = b.onclick.bind(b)(); if (r != false) b.click(); } else { b.click(); }; return false;\" ");It works for me replacing this line by:
buffer.append("'); if ((b.onclick != null) && (typeof(b.onclick) != 'undefined')) { var r = b.onclick.bind(b)(); if (r != false) b.click(); }
else
{ b.click(); }; return false;\" ");