context modal closes when entity clicked