fix scroll and collapse for metadata expanded containers