Father’s 170.6 motion to disqualify the judge, made after the detention hearing, was not untimely as the court had not yet resolved any factual dispute. Father was a respondent in a juvenile dependency proceeding involving his son. Following the detention hearing, father filed a motion to disqualify the judge under section 170.6. The juvenile court found the motion untimely because the court had “made substantive rulings on the detention yesterday.” Father filed a petition for writ of mandate seeking review of the denial of his disqualification motion. The appellate court agreed, and granted the petition, disqualifying the judge from hearing any further proceedings. Father’s motion was filed within the statutory deadline. Further, at the detention hearing, the trial court did not resolve any contested fact issue relating to the merits. No witnesses were called, and no evidence other than the detention report was presented. The trial court’s findings at the detention hearing were akin to the probable cause finding made at a preliminary hearing, and did not involve the resolution of any contested issue of fact.