GE dishwasher drains when door opened

GE dishwasher, 25 yrs. old, soap dispenser not working for years, I just open door at wash cycle and add soap, but now as soon as door opened, unit drains. What does opening the door have to do with drain cycle?? Part needed?