You didn't say it flooded. Think about it. If it didn't flood, where does the water go? The pump isn't running if it is filling.
Your water is siphoning out.
Sometimes with a slow drain people will duct tape around the drain hose sealing it to the plumbing. This turns the drain in to a long drain hose that is lower than the water in the tub. So if air can't get in to it to break the siphon it sucks the water out of the tub as it is filling. This happens after the wash while filling for the rinse.
Same kind of thing happens if it is draining in to a utility sink. If the sink drains too slow and the end of of the drain hose is still in the water when it starts to fill then the same thing happens.
If it was a bad pressure hose or switch it would flood all over the floor. If it were a timer problem it would fill and stop filling when full then just sit there doing nothing.
Good Luck.