Added test to check panel in event even if layout is None.