fix popout/popin hide/show bug and fix scroll to bottom on load