If those bifold closet doors has his closet door swings or just get stuck, it is likely to be due to a faulty or loose axis of rotation. There is a way to repair the door, but requires a little time. Remove the door track and lifting the panel slides out. Remove the pivot pin hole. You may need pliers to do this. Obtain a wooden dowel and drilling the pivot hole in the bifold closet doors with the diameter of the rod. Place glue in the hole and insert the plug. Let dry.
Once a plug cut out of the dry door height.