How To Fix a Door that Won't Stay Open
A door that won't stay put, when part way or all the way open can be annoying. Whether it swings closed or open, if it moves on its own, it is not properly adjusted. The problem can result from the door and it's hardware, or it can result from settling of the building.
If you hold a string with a weight tied to the end, the weight will swing and stop, pointing straight down. It stops at the lowest point of its swing arc. When a door moves, it is acting in a similar manner, it is trying to move to the lowest point in its arc. When a door is properly adjusted, all points of its swing arc are level and so there is no lowest point.
Assuming that a door is square and balanced, then it will have a low point in it's swing arc when one of it's hinges is not plumb with the other hinge. Using the the image below as an example, the top hinge is farther into the doorway than the bottom hinge. In this case the door will tend to swing closed. If the bottom hinge is farther into the doorway, the door will tend to swing open.
If the door hinges are plumb when looking at them from in front of the door, then the next thing to check is that they are plumb when looking at them from the door frame. Open the door, step in to the opening and turn to face the hinges. If the top hinge is to the left or right of the bottom hinge, the door is going to swing in the direction of the top hinge.
The goal is to restore the hinges to plumb. When the hinges are plumb, the door should remain in whatever position it is placed. If the house has shifted significantly, it may be impossible to adjust the hinges and have the door look acceptable. In that case you may need to reinstall the entire door frame to restore it to plumb.
Page 1 of 2