Make popups disableable (fixes #280)