fix(portal): an overlay opens on the side that fits