Why isn't the toilet water refilling from under the rim?
The water that comes from under the rim, but after the flush comes from a flexible tube that goes from the flush valve (typically on the left of the tank) to the top of the pipe in the center of the tank.  As the water refills the tank, the tube sprays water down the pipe which leads down to the rim and bowl.  

This fill tube can come off or get kinked.