The accident, in Spain, caused the tablet to strike the three-year-old’s head, police say.