
284 S.W.3d 182 (2009)
Devlin P. MOYERS, Appellant,
v.
Suzanne N. MOYERS, Respondent.
No. ED 91121.
Missouri Court of Appeals, Eastern District, Division Two.
April 14, 2009.
*183 Nathan S. Cohen, Clayton, MO, for appellant.
Cary J. Mogerman, Mary E. Niemira, Clayton, MO, for respondent.
LAWRENCE E. MOONEY, Judge.
The father, Devlin Moyers, appeals the judgment of the Circuit Court of the City of St. Louis, dismissing with prejudice his petition for legal separation from the mother, Suzanne Moyers. We affirm the judgment of dismissal because the trial court lacked jurisdiction to determine child custody and because the doctrine of forum non conveniens renders Massachusetts the more appropriate forum for trial of all claims asserted in the father's petition. However, because the court lacked jurisdiction to adjudicate child custody and because the court declined to exercise jurisdiction on the other issues, we modify the judgment to a dismissal without prejudice.
The parties met in Massachusetts and married there in February 2006. Their child was born in Massachusetts the following *184 December. The family resided in Massachusetts until moving to St. Louis on June 27, 2007 so that the mother could assume a new position with her employer. Some three months later, the mother obtained an ex parte order of protection against the father and ultimately a full order of protection. The order of protection awarded the mother custody of the parties' child and awarded no visitation, child support, or maintenance. The mother returned to Massachusetts with the child on December 19, 2007, just days before the child would have obtained six months of residence in Missouri. The next day, the mother's Massachusetts attorney wrote to the father's counsel that "Ms. Moyers and [the child] have returned home to Massachusetts, permanently." The mother then filed a complaint for separate support and child custody in Massachusetts.
The father filed a petition for legal separation in Missouri on January 10, 2008. The father sought an order of legal separation, joint legal and physical custody of the parties' child, division of marital property and debts, an award of his separate property, and an award of attorney's fees, suit money, and costs. The mother later filed a divorce complaint in Massachusetts in which she sought sole custody of the parties' child, maintenance and child support, conveyance of the parties' St. Louis home, and division of the marital property.[1]
The mother moved to dismiss the father's Missouri petition for legal separation.[2] At the motion hearing, the trial court confirmed that the mother had moved "to dismiss for lack of subject[-]matter jurisdiction under the Uniform Child Custody Jurisdiction Act" and that "the request to dismiss is only with respect to the issues of custody." Following the hearing and after conferring with the judge presiding over the mother's Massachusetts divorce action, the trial court entered its judgment dismissing with prejudice the father's petition for legal separation for failure to state a claim. The findings of fact and conclusions of law, however, make plain that the trial court considered its jurisdiction to adjudicate the child-custody issue and determined that Missouri lacks such jurisdiction. The trial court stated in a footnote that it dismissed with prejudice the father's petition in its entirety because Massachusetts has jurisdiction to determine all issues.
In two points on appeal, the father claims the trial court erred in dismissing his petition. He first claims the trial court erred in dismissing his request for custody of the parties' child. In his second point, the father claims the trial court erred in dismissing his petition in its entirety with prejudice.
The father first claims that the trial court improperly dismissed his petition because Missouri has home-state jurisdiction *185 over the child or, in the alternative, that Missouri has significant-connection jurisdiction. The decision to dismiss for lack of jurisdiction is generally a question of fact left to the trial court's sound discretion, and we shall not reverse the decision absent an abuse of discretion. Missouri Soybean Ass'n v. Missouri Clean Water Comm'n, 102 S.W.3d 10, 22 (Mo. banc 2003). However, where the facts are uncontested, a question as to the court's jurisdiction is purely a question of law, which we review de novo. Id.
In Missouri, the Uniform Child Custody Jurisdiction Act (UCCJA), section 452.440 et seq., governs jurisdiction in child-custody cases. Section 452.450.1 RSMo. (2000) provides four bases for a Missouri court to assume jurisdiction over a child's custody.[3] In short, these are (1) home-state, (2) significant-connection, (3) emergency, and (4) default jurisdiction.[4] The Massachusetts Child Custody Jurisdiction Act provides for the same four bases for assuming jurisdiction of a child-custody matter. Mass. Gen. Laws. Ann. ch. 209B, sec. 2 (West 2007).[5]
Missouri has home-state jurisdiction where this state either (a) is the child's home state when the proceeding commences or (b) was the child's home state within six months before the proceeding commenced, the child is absent from the state, and a parent continues to live in Missouri. Section 452.450.1(1). Massachusetts law provides for substantially similar home-state jurisdiction. Mass. Gen. Laws. Ann. ch. 209B, sec. 2(a)(1) (West 2007). Where, as here, the child is six months of age or older, a child's home state is the state in which the child lived with his or her parent(s) for at least six consecutive months immediately preceding the filing of the custody proceeding. Section 452.445(4).[6] Periods of temporary absence *186 count as part of the six-month period. Id. The Massachusetts statute defines the term "home state" in substantially the same manner. Mass. Gen. Laws. Ann. ch. 209B, sec. 1 (West 2007).
Missouri has "significant-connection" jurisdiction where it is in the child's best interest that a Missouri court assume jurisdiction because the child and at least one litigant have a significant connection with this state, and substantial evidence concerning the child's care, protection, training, and personal relationships is available here. Section 452.450.1(2). Massachusetts law provides for significant-connection jurisdiction where no other state has home-state jurisdiction. Mass. Gen. Laws Ann. ch. 209B, section 2(a)(2) (West 2007).
Here, the trial court concluded that Missouri did not qualify as the child's home state because the child had not been in Missouri for six consecutive months immediately preceding filing of the father's petition. The trial court also concluded that Massachusetts did not have home-state jurisdiction because both parents and the child had left Massachusetts. The trial court then determined that Missouri lacked significant-connection jurisdiction while Massachusetts had such jurisdiction, given the mother's return to Massachusetts where she had been a life-long resident, combined with the father's and the child's previous residence there.
We agree with the trial court that neither Missouri nor Massachusetts qualified as the child's home state at the time the father filed his petition in Missouri. The evidence adduced at the hearing on the mother's motion established that the child came to live in Missouri on June 27, 2007 and that she left Missouri slightly less than six months later, on December 19, 2007. The father argues that the mother's return to Massachusetts with the child was intended to be temporary until the father filed his petition on January 10, 2008. Only at that time, the father contends, did the mother decide to stay in Massachusetts permanently and to file for divorce there.
It is true that a child's temporary absence will not break her period of residence for purposes of determining Missouri to be the home state. Section 452.445(4). But here we find that the child's departure on December 19, 2007 was intended to be permanent. Without objection, the mother introduced at the hearing a letter from the mother's Massachusetts attorney to the father's former counsel. The December 20, 2007 letter informs the father and his counsel that "Ms. Moyers and [the child] have returned home to Massachusetts, permanently." Given this evidence, we reject the father's argument that the mother's return to Massachusetts with the child was intended to be temporary. We conclude that the child did not reside in Missouri for the requisite six months in order for Missouri to have home-state jurisdiction pursuant to section 452.450.1(1).
We also reject the father's alternative assertion that Missouri had significant-connection jurisdiction over the child. The father and mother met in Massachusetts, resided there, and married there. The child was born in Massachusetts and lived there for seven months. The mother's *187 parents and extended family live in Massachusetts, and the mother has returned to employment there. On the other hand, the child lived in St. Louis, Missouri for five-and-three-quarters months. The father's mother, stepfather, and stepfather's family live in the Springfield, Missouri area, and although the father lived in Springfield at the time of the hearing, he had no employment. The father testified that the cost of living in Massachusetts was an impediment to his relocation there, and that the conditions of his bond required him to stay in Missouri.
The evidence shows that neither the child nor either of her parents has a significant connection to Missouri, and there is no substantial evidence available in Missouri concerning the child's present or future care, protection, training, and personal relationships. Rather, the evidence shows that the child has a significant connection to Massachusetts, and substantial evidence concerning the child's care, protection, training, and personal relationships is available there. For these reasons, we conclude that Missouri does not meet the requirements for significant-connection jurisdiction pursuant to section 452.450.1(2). We deny point one.
In his second point, the father challenges the trial court's dismissal, with prejudice, of his petition for legal separation in its entirety because the court provided the father with no notice or an opportunity to be heard before dismissing the petition; because the father adequately pleaded a claim for legal separation; and because the trial court's determination that it lacked jurisdiction over the custody issue did not divest it of jurisdiction over the remaining issues in the father's petition.
The trial court dismissed the father's petition in its entirety and with prejudice for failure to state a claim for which relief can be granted. In a footnote, however, the trial court stated that it dismissed the father's petition because Massachusetts has jurisdiction to determine all issues. We disagree with the trial court that the father failed to state a claim for legal separation. However, we interpret the trial court's footnote to mean that the court dismissed the non-custody portions of the father's petition based on the doctrine of forum non conveniens, and dismissal on this basis was proper.
The doctrine of forum non conveniens provides that while a trial court may have proper jurisdiction and venue, the court has discretion to decline to exercise jurisdiction if the forum is seriously inconvenient for the trial and if a more appropriate forum is available to the plaintiff. Chandler v. Multidata Systems Int'l Corp., Inc., 163 S.W.3d 537, 545 (Mo.App. E.D.2005). The question of whether to dismiss a case on the basis of forum non conveniens requires the court to weigh multiple factors, and we leave the decision largely to the broad discretion of the trial court. State ex rel. Wyeth v. Grady, 262 S.W.3d 216, 219 (Mo. banc 2008).
The trial court should weigh six important, but non-exclusive, factors in making its decision: 1) the place where the cause of action accrued; 2) the location of witnesses; 3) the parties' residence; 4) any nexus with the place of suit; 5) the public factor of the convenience to and burden on the court; and 6) the availability of another court with jurisdiction that affords a forum for the plaintiff. Id. at 220. Any additional factors considered and the weight assigned to each depend upon the circumstances of the particular case. Id. In addition to the foregoing factors, the trial court shall consider whether proceeding in Missouri would cause injustice by oppressing the defendant or place an undue burden on the court. Id.
*188 Here, the factors favor dismissal of the father's petition. The parties had resided in Massachusetts where they met, married, and had their child before living together in St. Louis for only a few months. The evidence showed that the mother and the child returned permanently to Massachusetts in December 2007, while the father moved to Springfield, Missouri. The mother filed her complaint for separate support and child custody in Massachusetts before the father filed his petition in Missouri. And Massachusetts provides the father a forum in which to seek a remedy, and only Massachusetts has jurisdiction to adjudicate all issues in the case. Under these circumstances, proceeding in Missouri would be oppressive to the mother and would place an undue burden on the Missouri courts, which lack jurisdiction to adjudicate all issues between the parties. The trial court properly declined to exercise its jurisdiction in favor of the more appropriate Massachusetts forum. We deny point two.
The court properly dismissed the father's petition because the court lacked jurisdiction under Missouri's UCCJA to award custody of the parties' child and because the doctrine of forum non conveniens renders Massachusetts the more appropriate forum for trial of all issues related to termination of the parties' marriage. We affirm the judgment of dismissal.
However, the trial court should have dismissed the cause without prejudice. Missouri Soybean, 102 S.W.3d at 29. No prejudice attaches when a court dismisses an action because it lacks jurisdiction. See id. And a dismissal based on forum non conveniens is necessarily a dismissal without prejudice. Chandler, 163 S.W.3d at 548. We enter such judgment as the court ought to have given and modify the judgment of dismissal so that it is without prejudice. Rule 84.14; Missouri Soybean, 102 S.W.3d at 29; Chandler, 163 S.W.3d at 548.
ROY L. RICHTER, P.J., and GEORGE W. DRAPER, III, J., concur.
NOTES
[1]  This parties submitted the appeal to this Court on the parties' briefs on February 11, 2009. The Massachusetts court entered a judgment of divorce nisi on March 12, 2009, which appears to become absolute on June 11, 2009. The mother moved to dismiss the appeal as moot. We deny the motion. While Missouri courts generally must dismiss moot cases, we have discretion to review a moot case in two instances. T.D.H. v. O'Connell, 258 S.W.3d 850, 851 (Mo.App. E.D.2008). When, as here, the claimed mootness arose after argument and submission, our decision to dismiss for mootness becomes discretionary rather than mandatory. Id. We decline to dismiss the father's appeal because the Massachusetts judgment does not appear to be absolute.
[2]  The legal file contains no written motion to dismiss nor do the court minutes show that the mother filed a written motion.
[3]  All Missouri statutory references are to RSMo. (2000).
[4]  Section 452.450.1 provides in full:

A court of this state which is competent to decide child custody matters has jurisdiction to make a child custody determination by initial or modification decree if:
(1) This state:
(a) Is the home state of the child at the time of commencement of the proceeding; or
(b) Had been the child's home state within six months before commencement of the proceeding and the child is absent from this state for any reason, and a parent or person acting as parent continues to live in this state; or
(2) It is in the best interest of the child that a court of this state assume jurisdiction because:
(a) The child and his parents, or the child and at least one litigant, have a significant connection with this state; and
(b) There is available in this state substantial evidence concerning the child's present or future care, protection, training, and personal relationships; or
(3) The child is physically present in this state and:
(a) The child has been abandoned; or
(b) It is necessary in an emergency to protect the child because he has been subjected to or threatened with mistreatment or abuse, or is otherwise being neglected; or
(4) It appears that no other state would have jurisdiction under prerequisites substantially in accordance with subdivision (1), (2), or (3), or another state has declined to exercise jurisdiction on the ground that this state is the more appropriate forum to determine the custody of the child, and it is in the best interest of the child that this court assume jurisdiction.
[5]  The father does not claim that Missouri has jurisdiction based on emergency under section 452.450.1(3) or based on default under section 452.450.1(4), nor does the evidence implicate either of these subsections. Therefore, we shall not address them.
[6]  Section 452.445(4) defines "home state" in full as follows.

[T]he state in which, immediately preceding the filing of [the] custody proceeding, the child lived with his parents, a parent, an institution[,] or a person acting as parent, for at least six consecutive months; or, in the case of a child less than six months old, the state in which the child lived from birth with any of the persons mentioned. Periods of temporary absence of any of the named persons are counted as part of the six-month or other period[.]
