Interior closet doors often feature a ball and spring latching mechanism installed on the top. The ball is held in place by a mounting plate and has tension applied by a spring mounted behind the ball. A strike plate is attached to the door frame into which the ball sits when the door is closed. Spring tension on the ball holds the ball in a small indentation in the strike plate. Adjusting the spring and ball can often resolve many latching issues.
Inspect the door and door frame. Look at the ball and latch plate to determine if they are properly aligned.
Adjust the door hinges to align the door to the frame if necessary. Tighten the door hinges with a screwdriver, or tap the pin back down into the hinge with a hammer.
Oil the ball and spring latching mechanism with multipurpose oil. Apply a few drops of oil to the ball and close the door to determine if the door is still difficult to latch.
Remove the ball mechanism from the door. Adjust the depth of the spring behind the ball, using a screwdriver. Reduce the height of the ball by turning the adjustment screw to the right. Increase the ball height by turning the adjustment screw to the left.
Tighten the latch plate on the door frame. Tighten the screws on the latch plate to secure it to the door frame.