removes the context menu if target or parents is a link