
157 Cal.App.3d 110 (1984)
203 Cal. Rptr. 537
In re BRANDIE W., a Minor.
CANDIE R., Plaintiff and Appellant,
v.
ROBERT D., Defendant and Respondent.
Docket No. F002944.
Court of Appeals of California, Fifth District.
June 13, 1984.
*111 COUNSEL
Philip Richard Heilbut for Plaintiff and Appellant.
Glenn M. Kottcamp for Defendant and Respondent.
OPINION
THE COURT.[*]
Defendant, Robert D., is the father of Brandie W., a minor. Brandie was conceived out of wedlock while her mother, plaintiff Candie R., was a minor. At the time of conception, Robert was an adult. Robert and Candie have never been married or lived together.
Approximately two and one-half years after Brandie was born, Candie applied for public assistance. She named Robert as Brandie's father. A complaint against Robert was filed in the Superior Court of Fresno County. In *112 the complaint, the district attorney alleged that Robert was the father. Among other things, the complaint prayed for a formal declaration that Robert was Brandie's natural father and that he pay child support.
In Robert's answer, he denied his fatherhood. It was later stipulated that both parties would submit to blood tests to determine if Robert was "medically excluded from the possibility of paternity" of Brandie. The court ordered the tests performed. The parties then stipulated that Robert was Brandie's natural father.
Thereafter, the court found Robert to be Brandie's natural father and ordered Robert to pay support payments. It was further ordered that Brandie be issued a new birth certificate changing her last name to Robert's last name and listing Robert as her natural father.
About six months later, allegedly after Candie refused to let Robert continue visits with Brandie, Robert filed a motion for joint custody and reasonable visitation rights. Candie opposed Robert's requests. She consented only to full custody on her part and visitation on the condition it could be established that Brandie would not be adversely affected by Robert's visits. Supporting and opposing papers were filed by each side.
After a hearing in which both Robert and Candie testified and arguments were made by counsel for each side, the court, in a carefully written ruling, denied Robert's request for custody but granted visitation.
A timely appeal followed.

DISCUSSION
(1a) Candie argues on appeal that the court erred in granting Robert's motion for visitation. She posits several theories in support of her position. First, she argues that because Robert is technically an admitted statutory rapist attempting to benefit from his wrongdoing, the court should have applied the unclean hands doctrine for either of two purposes: (1) dismissal for lack of jurisdiction; or (2) for a plaintiff's judgment. Second, Candie contends that Robert is not a parent within the meaning of Civil Code section 4600 and section 4601. Third, she claims that the court was biased against her. Finally, she argues that Robert's motion should have been dismissed due to his failure to submit in a timely manner his points and authorities to the court.
Candie argues that Robert has technically admitted to statutory rape by acknowledging fatherhood, therefore coming before the court with unclean *113 hands. A finding of unclean hands, the argument goes, requires that the court decline jurisdiction and dismiss the action. This jurisdictional argument, presented without supporting statutory or judicial authority, fails. Candie misconstrues the application and policy behind the clean hands doctrine in child custody jurisdiction.
The common law clean hands doctrine was codified and included in the Family Law Act. (Civ. Code, § 5157.) In the context of child custody cases, the codified doctrine anticipates a factual situation not present in the instant case: Civil Code section 5157 deals with cases where the courts of other states, as well as the courts of California, may, for a number of reasons, have concurrent jurisdiction. Its provisions were written, in a large part, to further an important state policy which disfavors "child snatching" by parents seeking a more favorable forum. (Civ. Code, § 5150, subd. (1)(e); see also Porter & Walsh, The Evolution of California's Child Custody Laws: A Question of Statutory Interpretation (1975) 7 Sw.U.L.Rev. 1, 28.) Therefore, the court did not abuse its discretion when refusing to apply the doctrine in this manner. (Marlow v. Wene (1966) 240 Cal. App.2d 670 [49 Cal. Rptr. 881].)
Candie's second argument in support of the application of the clean hands doctrine likewise must fail. She argues that the common law clean hands doctrine, as codified in yet another section of the Civil Code, may be applied to child custody cases not involving jurisdictional disputes. Civil Code section 3517 states that "No one can take advantage of his own wrong." She seeks to use this section as an affirmative defense against Robert's motion for visitation and custody. (2) The determination that a party has unclean hands under this second Civil Code section is also a matter of judicial discretion. (Pon v. Wittman (1905) 147 Cal. 280 [81 P. 984].) And even where a finding of unclean hands is factually established, a court may still refuse to apply the doctrine if a manifest injustice will result. (Womack v. Womack (1966) 242 Cal. App.2d 572, 577 [51 Cal. Rptr. 668].)
In their briefs, neither party has cited any case from this state applying the clean hands doctrine to facts analogous to those before us. Our own research has likewise been unfruitful. Preliminarily, we note that in In re Marriage of Popenhager (1979) 99 Cal. App.3d 514, 523 [160 Cal. Rptr. 379], the court applied the doctrine partly to resolve an issue involving payment of support arrearages and visitation rights. However, our research revealed that to date Popenhager has never been cited by another court for its application of the doctrine.
In her arguments below, Candie cited as authority for her position a case from New York. Robert cited another, later New York case for the opposite *114 position. Although Candie fails to cite these cases in her appellate brief, we will discuss their bearing on the issues on appeal because the trial court squarely confronted the split in authority which they represent.
In Hines v. Sullivan (1980) 105 Misc.2d 288 [431 N.Y.S.2d 868], the court held that a putative father was precluded from bringing a cause of action under New York law because the "basis of his claim of paternity rest[ed] upon his own wrongdoing." (Id., at p. 870.) The court reasoned that the basis of the suit was the result of the father's wrongdoing because the mother was only 14 or 15 years old when she became pregnant.
Less than a year later, in LaCroix v. Deyo (1981) 108 Misc.2d 382 [437 N.Y.S.2d 517], a different New York family court refused to apply the clean hands doctrine to bar a putative father's cause of action in a case where the mother became pregnant prior to reaching the age of consent.
The LaCroix court expressly disagreed with the Hines decision in refusing to dismiss the putative father's case. (Id., at p. 523.) It did so after briefly summarizing the evolution of the rights of both men and women involved in paternity suits where the child is the product of an extramarital relationship  a mother under the age of consent being one of those factual possibilities.
We decline the opportunity to summarize the history of those rights as they have evolved under California and federal law.
(1b) We do hold, however, that under facts such as those before us, it is not in the best interests of the child to apply the clean hands doctrine to prevent the biological father from visitation with his child.[1] Such a result is in accord with the policy of this state as expressed in our statutory scheme for parental preference in custody cases. (Civ. Code, § 4600, subd. (b).)
Robert has both acknowledged parenthood and provided financial support. He now stands ready to assume the full responsibility of fatherhood. Candie does not contest that Robert is Brandie's father; instead, she attempts to place only the burdens of fatherhood on Robert while withholding the benefits. But benefits run both ways, and it is the benefits Brandie receives from the parent/child contact with Robert about which we are most concerned. (See, e.g., San Diego County Dept. of Pub. Welfare v. Superior Court (1972) 7 Cal.3d 1, 9 [101 Cal. Rptr. 541, 496 P.2d 453]; People v. Johnson (1983) 151 Cal. App.3d 1021, 1025 [199 Cal. Rptr. 231].) It would seem *115 inconceivable, for example, to take Brandie from Candie and not allow visitation had Candie been the adult and Robert the parent who was under the age of consent at the time of conception.
Indeed, it is questionable if the clean hands doctrine has any application to the facts before us. (3) "[N]ot every wrongful act nor even every fraud ... prevents a suitor in equity from obtaining relief. The misconduct which brings the clean hands doctrine into operation must relate directly to the transaction concerning which the complaint is made, i.e., it must pertain to the very subject matter involved and affect the equitable relations between the litigants. Accordingly, relief is not denied because the plaintiff may have acted improperly in the past or because such prior misconduct may indirectly affect the problem before the court." (Fibreboard Paper Products Corp. v. East Bay Union of Machinists (1964) 227 Cal. App.2d 675, 728-729 [39 Cal. Rptr. 64].)
While Brandie is concededly the result of the transaction which her parents' sexual relationship represents, she was not a party to it. (2 Pomeroy, A Treatise on Equity Jurisprudence (5th ed. 1941) The Fundamental Principles or Maxims of Equity, § 399, p. 94.) Nor is that transaction the subject matter of the present case. The parties to the transaction with which we are concerned here are Brandie and Robert. (1c) The facts do not reveal that Robert has had unclean hands with respect to Brandie. Again, we find no abuse of discretion on the part of the trial court.
Candie's argument that Robert, the acknowledged natural father of Brandie, is not a "parent" within the meaning of Civil Code sections 4600 and 4601 is wholly without merit. (In re Reyna (1976) 55 Cal. App.3d 288, 297 [126 Cal. Rptr. 138].)
Candie also asserts that we must reverse because the trial court exhibited bias against her during an off-record, post hearing motion held in chambers. While we have no record before us by which to examine the court's comments, we find the result reached to be the correct one. Therefore, any bias, if indeed any was present, was harmless. (D'Amico v. Board of Medical Examiners (1974) 11 Cal.3d 1, 19 [112 Cal. Rptr. 786, 520 P.2d 10].)
Finally, Candie argues that the court erred in accepting Robert's untimely filed points and authorities. If error, such defect is also harmless. (Code Civ. Proc., § 475.) Further, Candie has waived the right to raise this issue *116 on appeal by her failure to object below. (6 Witkin, Cal. Procedure (2d ed. 1971) Appeal, § 276, pp. 4264-4265.)
The judgment is affirmed.
NOTES
[*]   Before Hanson (P.D.), Acting P.J., Andreen, J., and Woolpert, J.
[1]  By limiting our decision to the facts of this case, we express no opinion about a proper result in a case where aggravating factors, such as rape by a stranger, are present.
