Close popup if open when cat buttons toggled