Description
AjaxRequestTarget calls isEnabled for behaviors even if the related component is not visible in hierarchy.
Exlpicit problems: hide using ajax a panel containing datefield having datepicker behavior and the javascript will crash in browser. Mozilla will survive but ie8 will not execute ajaxpostcallhandlers.
Following code should probably call component.isVisibleInHierarchy instead of just isVisible:
public class AjaxRequestTarget implements IPageRequestTarget
{
...
if (component instanceof MarkupContainer)
{
((MarkupContainer)component).visitChildren(new Component.IVisitor<Component>()
{
public Object component(Component component)
{
if (component.isVisible())