add viewport, and close sidebar on click everywhere