
178 Cal.App.4th 869 (2009)
LAW OFFICES OF ANDREW L. ELLIS, Plaintiff and Respondent,
v.
MELANIE YANG et al., Defendants and Appellants.
No. B205452.
Court of Appeals of California, Second District, Division Three.
October 27, 2009.
*872 Law Offices of Jeffrey T. Bell and Jeffrey T. Bell for Defendants and Appellants.
Law Offices of Andrew L. Ellis, Andrew L. Ellis and Mitchell J. Langberg for Plaintiff and Respondent.

OPINION
ALDRICH, J. 

I.

INTRODUCTION
In this appeal from the denial of an anti-SLAPP motion (Code Civ. Proc., § 425.16),[1] we hold that the trial court lacked the jurisdiction to rule on the merits of the motion because prior to the ruling plaintiff had voluntarily dismissed the case before trial had commenced, i.e., plaintiff had filed a *873 request for dismissal prior to the trial court making a dispositive ruling or giving an indication of the merits of the underlying case, and prior to a time when the procedural posture was such that plaintiff would inevitably lose.

II.

FACTUAL AND PROCEDURAL BACKGROUND

A. The initial facts.

Defendants and appellants are Melanie Yang, individually and doing business as the Law Offices of Melanie M. Yang, and Wei Zang, also known as William Zhang. Defendant Zang worked as an office manager in defendant Yang's law firm.
In 2006, defendants retained plaintiff and respondent the Law Offices of Andrew L. Ellis, a professional corporation (plaintiff or the firm), to represent defendant Zang in James Li v. Wei Zang.
Defendant Zang was not pleased with the representation he received from plaintiff in James Li v. Wei Zang. Defendants refused to pay plaintiff's attorney fee bill.

B. The complaint in the instant matter.

Plaintiff sued defendants alleging breach of contract, fraud in the inducement (false promises), and intentional interference with prospective economic relations. Plaintiff alleged the following: The firm had agreed to represent defendant Zang in James Li v. Wei Zang based upon defendants' promises that defendant Yang would guarantee the payment of attorney fees, defendants would transfer five civil lawsuits to the firm, and the firm would split fees with defendant Yang on the referred cases. Four proposed clients agreed to plaintiff's representation after meeting with Attorney Andrew L. Ellis, the principal attorney in the firm. Defendants breached the agreement because they never referred a fifth case to the firm. The firm competently represented Zang in James Li v. Wei Zang in a lengthy trial that resulted in a verdict against Zang for about $4,000. Defendants breached their agreement by refusing to pay the firm attorney fees owed. Defendants "began a concerted effort to interfere with plaintiff's contractual relationships with the four (4) clients [whose cases] had been transferred ...." Further, "defendants ... quickly arranged for another attorney to take the [four] cases away from *874 plaintiff, in an effort to harm plaintiff by depriving it of its ... share of the contingency fees."
Attorney Ellis and Attorney Hugh Jeffrey Grant represented plaintiff in the lawsuit against defendants.

C. Defendants' anti-SLAPP motion.

Defendants answered. Defendants also filed an anti-SLAPP motion to strike pursuant to Code of Civil Procedure section 425.16.
Thereafter, defendants filed a document entitled "notice of non-opposition to defendants' notice of motion and special motion to strike ...." In this document, defendants requested the trial court grant their motion to strike because plaintiff had not filed an opposition thereto.
On August 29, 2007, the day before the scheduled hearing, plaintiff filed a request for dismissal without prejudice.
On August 30, 2007, the parties appeared for hearing on defendants' anti-SLAPP motion. The trial court stated that plaintiff's request for dismissal did not prevent the court from going forward and the court indicated that it appeared the anti-SLAPP motion should be granted. Attorney Grant, appearing for plaintiff, stated his office had inadvertently erred in not opposing the anti-SLAPP motion. He also stated that after the case was dismissed, he intended to file another complaint. Attorney Grant then presented an oral argument as to why the anti-SLAPP motion should not be granted and he made a request to continue the matter so plaintiff could file an opposition to defendants' motion. Defendants argued against the continuance request and argued their motion should be granted. The trial court did not continue the case and took the matter under submission noting that plaintiff's recourse was to file a motion for relief pursuant to Code of Civil Procedure section 473 or a motion for reconsideration (Code Civ. Proc., § 1008).
A week later, the clerk served the parties with a notice of entry of order, attaching the trial court's ruling granting the anti-SLAPP motion. In its order, the trial court also ruled that the dismissal had not mooted the motion and held that defendants were entitled to attorney fees pursuant to Code of Civil Procedure section 425.16, subdivision (c).

D. Plaintiff's motion to set aside the dismissal and the court's grant of reconsideration on its own motion.

Six days after the parties were served with the trial court's ruling on defendants' anti-SLAPP motion, defendants filed a motion seeking attorney fees and costs. (Code Civ. Proc., § 425.16, subd. (c).)
*875 Thereafter, plaintiff moved for relief pursuant to Code of Civil Procedure section 473, subdivision (b). Plaintiff attached to the motion Attorney Grant's declaration in which he explained why he had not filed an opposition to the anti-SLAPP motion and he requested an opportunity to do so.
Plaintiff also moved the court ex parte to continue defendants' motion for attorney fees until after its motion for relief could be heard. The trial court granted this motion and placed defendants' attorney fees motion off calendar.
Subsequently, the trial court denied plaintiff's Code of Civil Procedure section 473 motion. However, the court granted reconsideration on its own motion of its ruling on defendants' anti-SLAPP motion. The trial court gave defendants an opportunity to reply to plaintiff's opposition to the anti-SLAPP motion previously filed, and set the hearing on the anti-SLAPP motion for January 3, 2008.

E. The trial court's ruling on the reconsideration motion.

Despite the request for voluntary dismissal filed by plaintiff, the court held that it had jurisdiction to hear defendants' anti-SLAPP motion and also had jurisdiction to reconsider its ruling on the motion. On January 8, 2008, the trial court issued its ruling granting reconsideration and denying defendants' anti-SLAPP motion to strike. In doing so, the trial court relied on Sylmar Air Conditioning v. Pueblo Contracting Services, Inc. (2004) 122 Cal.App.4th 1049 [18 Cal.Rptr.3d 882] and Simmons v. Allstate Ins. Co. (2001) 92 Cal.App.4th 1068 [112 Cal.Rptr.2d 397].
Defendants appeal from the order denying their anti-SLAPP motion to strike (Code Civ. Proc., § 425.16).

III.

CONTENTIONS
Defendants contend on appeal that (1) the trial court lacked the jurisdiction to reconsider, on the court's own motion, the anti-SLAPP motion; (2) the trial court erred in denying their anti-SLAPP motion to strike; and (3) the complaint should be struck because it violated the attorney-client privilege.
In addition to other contentions, plaintiff contends that because it voluntarily had dismissed its complaint, the trial court was without jurisdiction to *876 consider defendants' anti-SLAPP motion and was only permitted to decide if attorney fees and costs should have been awarded to defendants. Plaintiff is correct. Further, because this contention is dispositive and because it involves a jurisdictional inquiry, we need only address this contention.
We vacate the trial court's order denying defendants' anti-SLAPP motion and remand the case to the trial court with directions to enter a dismissal without prejudice.

IV.

DISCUSSION
The trial court had no jurisdiction to entertain defendants' anti-SLAPP motion to strike because plaintiff had filed a dismissal before the court considered defendants' motion.
(1) Pursuant to Code of Civil Procedure section 581, subdivisions (b) and (c), plaintiffs have the right to voluntarily dismiss an entire action, or causes of action within a pleading, before the commencement of trial. A request for a dismissal is usually effective upon filing, and no other action by the clerk or the court is required. (Aetna Casualty & Surety Co. v. Humboldt Loaders, Inc. (1988) 202 Cal.App.3d 921, 931 [249 Cal.Rptr. 175] (Aetna Casualty).) "`[N]either the clerk nor the trial court has any discretion in the matter. [Citation.]' (O'Dell v. Freightliner Corp. (1992) 10 Cal.App.4th 645, 659 [12 Cal.Rptr.2d 774].)" (Conservatorship of Martha P. (2004) 117 Cal.App.4th 857, 866 [12 Cal.Rptr.3d 142]; see Aetna Casualty, supra, at p. 931.) Upon the proper filing of a request to voluntarily dismiss a matter, the trial court loses jurisdiction to act in the case, "except for the limited purpose of awarding costs and statutory attorney fees." (Gogri v. Jack in the Box Inc. (2008) 166 Cal.App.4th 255, 261 [82 Cal.Rptr.3d 629]; accord, Conservatorship of Martha P., supra, at p. 866.) "[A]ll subsequent proceedings [are] void." (Aetna Casualty, supra, at p. 931; accord, Gogri v. Jack in the Box Inc., supra, at p. 261.)
Code of Civil Procedure section 581 reads in pertinent part: "(b) An action may be dismissed in any of the following instances: [¶] (1) With or without prejudice, upon written request of the plaintiff to the clerk, filed with papers in the case, or by oral or written request to the court at any time before the actual commencement of trial, upon payment of the costs, if any. [¶] ... [¶] (c) A plaintiff may dismiss his or her complaint, or any cause of action *877 asserted in it, in its entirety, or as to any defendant or defendants, with or without prejudice prior to the actual commencement of trial." (Italics added.)[2]
(2) Subdivision (a) of Code of Civil Procedure section 581 sets forth the definition of when trial commences. It reads: "As used in this section: [¶] ... [¶] (6) `Trial.' A trial shall be deemed to actually commence at the beginning of the opening statement or argument of any party or his or her counsel, or if there is no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence." (Ibid.) The phrase "`commencement of trial'" and the definition of "`trial'" are "`illustrative rather than exclusive ....' [Citation.]" (Gray v. Superior Court (1997) 52 Cal.App.4th 165, 171 [60 Cal.Rptr.2d 428]; see Franklin Capital Corp. v. Wilson (2007) 148 Cal.App.4th 187, 194 [55 Cal.Rptr.3d 424].) Courts examine the circumstances to determine if, in that situation, a trial has "commenced," and thus, whether the plaintiff is precluded from voluntarily dismissing the case. (Cravens v. State Bd. of Equalization (1997) 52 Cal.App.4th 253, 256 [60 Cal.Rptr.2d 436] [right to voluntarily dismiss action is not absolute].)
For example, "once a general demurrer is sustained with leave to amend and plaintiff does not so amend within the time authorized by the court or otherwise extended by stipulation or appropriate order, he [or she] can no longer voluntarily dismiss his [or her] action pursuant to [Code of Civil Procedure] section 581, even if the trial court has yet to enter a judgment of dismissal on the sustained demurrer." (Wells v. Marina City Properties, Inc. (1981) 29 Cal.3d 781, 789 [176 Cal.Rptr. 104, 632 P.2d 217].)
(3) Until recently, the cases have not presented a completely clear or cohesive test to describe which situations deprive plaintiffs of their right to voluntarily dismiss their cases, nor have the cases articulated a precise rule providing guidance in all circumstances. (See Franklin Capital Corp. v. Wilson, supra, 148 Cal.App.4th 187 for a compilation of cases discussing when a plaintiff is precluded from voluntarily dismissing a case.) However, recent authority suggests parties are not permitted to voluntarily dismiss their actions after the court has made a dispositive ruling, given some indication of the legal merits of the case, or when the procedural posture is such that it is inevitable the plaintiff will lose. After such occurrences, these cases hold that plaintiffs lose their right to voluntarily dismiss their case. (E.g., Franklin Capital Corp. v. Wilson, supra, at p. 200 [voluntary dismissal without prejudice ineffective where "in the light of a public and formal indication by the trial court of the legal merits of the case, or [¶] ... in the light of some *878 procedural dereliction by the dismissing plaintiff that made dismissal otherwise inevitable"]; Mossanen v. Monfared (2000) 77 Cal.App.4th 1402, 1409 [92 Cal.Rptr.2d 459] [exception to plaintiffs' absolute right to dismiss where action has proceeded to a determinative adjudication, or to a decision that is tantamount to an adjudication]; accord, Gray v. Superior Court, supra, 52 Cal.App.4th 165 [plaintiff's right to dismiss cut off by evidentiary proceedings before a referee]; Gogri v. Jack in the Box Inc., supra, 166 Cal.App.4th at p. 267 [voluntary requests for dismissals are untimely where "prior tentative rulings or other special circumstances [make] judgment for the defendant inevitable"].)
We agree with Franklin Capital Corp. v. Wilson, supra, 148 Cal.App.4th 187 and other authority that this is the most logical way to synthesize the cases. (See also Lewis C. Nelson & Sons, Inc. v. Lynx Iron Corp. (2009) 174 Cal.App.4th 67, 76-79 [94 Cal.Rptr.3d 468].) When some events demonstrate it is inevitable that the plaintiff will not be successful, a plaintiff loses the right to voluntarily dismiss his or her case. (Id. at pp. 201-202, 204; cf. Datner v. Mann Theatres Corp. (1983) 145 Cal.App.3d 768, 771 [193 Cal.Rptr. 676] [informal tentative ruling does not cut off right to voluntary dismissal]; contra, Hartbrodt v. Burke (1996) 42 Cal.App.4th 168, 175 [49 Cal.Rptr.2d 562] [without much elaboration, court of appeal holds voluntary dismissal request ineffective when filed day before hearing on motion for terminating sanction in a discovery dispute].)
(4) Here, at the time plaintiff dismissed its complaint without prejudice, the trial court had not made a tentative or definitive ruling on defendants' anti-SLAPP motion and it was not inevitable that the motion would be granted. Even though plaintiff had not filed an opposition to defendants' anti-SLAPP motion, defendants' success was not guaranteed. In their motion to strike, defendants were required to make a "threshold showing that the challenged cause of action is one arising from protected activity. [As the moving party defendants'] burden [was] to demonstrate that the act or acts of which the plaintiff complains were taken `in furtherance of the [defendants'] right of petition or free speech under the United States or California Constitution in connection with a public issue,' as defined in [Code of Civil Procedure section 425.16, subdivision (b)(1)]." (Equilon Enterprises v. Consumer Cause, Inc. (2002) 29 Cal.4th 53, 67 [124 Cal.Rptr.2d 507, 52 P.3d 685].) Only if defendants met this requirement would plaintiff have been required to demonstrate a probability of prevailing on the claim in order to defeat the motion. (Ibid.) If plaintiff failed to do so, only then would the trial court have granted the motion to dismiss. (Evans v. Unkow (1995) 38 Cal.App.4th 1490, 1499 [45 Cal.Rptr.2d 624].) When the evidence is submitted, the trial court does not weigh the evidence. Thus, the "submission of evidence in a [Code of Civil Procedure] section 425.16 motion does not constitute `commencement of trial' under [Code of Civil Procedure] section *879 581." (Kyle v. Carmon (1999) 71 Cal.App.4th 901, 910 [84 Cal.Rptr.2d 303] (Kyle).) Therefore, plaintiff's failure to oppose the anti-SLAPP motion did not guarantee defendants would prevail and obtain an order to strike.
(5) Further, the anti-SLAPP statute, Code of Civil Procedure section 425.16, anticipates circumstances in which parties dismiss their cases while motions to strike are pending. In such circumstances, the trial court is given the limited jurisdiction to rule on the merits of the motion in order to decide if it should award attorney fees and costs to the defendants. (Pfeiffer Venice Properties v. Bernard (2002) 101 Cal.App.4th 211, 216, 218-219 [123 Cal.Rptr.2d 647]; Code Civ. Proc., § 425.16, subd. (c).) Thus, here when plaintiff dismissed its case at a time when defendants' anti-SLAPP motion was pending, the trial court continued to have jurisdiction over the case only for the limited purpose of ruling on defendants' motion for attorney fees and costs. (Code Civ. Proc., § 425.16, subd. (c); Kyle, supra, 71 Cal.App.4th at p. 908, fn. 4.)
(6) The decision in Kyle, supra, 71 Cal.App.4th 901, supports our conclusion. In Kyle, James Kyle sued Shelly Carmon. The appellate court held that Kyle had the right to dismiss his case against Carmon with prejudice while Carmon's anti-SLAPP motion was pending, but before the trial court had ruled on the motion. (Id. at p. 905.) Kyle noted that in the case before it, Kyle had dismissed the case with prejudice, and thus, Carmon and the court would not be subjected "to wasteful proceedings and continuous litigation. [Citation.]" (Id. at p. 909.) However, Kyle was not limited to situations where a plaintiff filed a request for dismissal with prejudice. Kyle also stated that while Kyle had stressed that his "dismissal was with prejudice.... [T]he current statute treats equally dismissals with or without prejudice, with respect to the right to dismiss before commencement of trial. ([Code Civ. Proc.,] § 581, subd. (c) ....)" (Kyle, supra, at p. 909, fn. omitted.) Kyle held that "a plaintiff retains the right to voluntary dismissal at any time before a ruling by the trial court on a [Code of Civil Procedure] section 425.16 motion." (Kyle, supra, at p. 912.) Kyle noted, however, that when plaintiffs dismiss their cases before the trial court rules on the anti-SLAPP motion, the trial court continues to have jurisdiction over the case for purposes of deciding if the plaintiffs are responsible for attorney fees and costs, but not to rule on the anti-SLAPP motion. (Id. at pp. 908, fn. 5, 917-919.)
Here, the trial court cited Sylmar Air Conditioning v. Pueblo Contracting Services, Inc., supra, 122 Cal.App.4th 1049 and the case upon which it relied, Simmons v. Allstate Ins. Co., supra, 92 Cal.App.4th 1068, to support its conclusion that it had jurisdiction to consider defendants' anti-SLAPP motion even though plaintiff had filed a voluntary request for dismissal.
*880 In Simmons v. Allstate Ins. Co., supra, 92 Cal.App.4th 1068, defendant Lester A. Simmons filed a cross-complaint against plaintiff Allstate Insurance Company. "At the hearing on [Allstate's anti-SLAPP motion,] Simmons's counsel, faced with an adverse tentative ruling, asked the court to grant Simmons leave to amend the cross-complaint. The court issued an order striking Simmons's cross-complaint and denied leave to amend." (Id. at p. 1072.) On appeal, the appellate court held that the trial court did not err in denying Simmons's motion to amend. The appellate court first noted that "[a]s Simmons concedes, the anti-SLAPP statute makes no provision for amending the complaint once the court finds the requisite connection to First Amendment speech." (Id. at p. 1073.) The appellate court then stated that to allow amendments after there was a tentative ruling would be contrary to the purpose of the anti-SLAPP motion: "Allowing a SLAPP plaintiff leave to amend the complaint once the court finds the prima facie showing has been met would completely undermine the statute by providing the pleader a ready escape from [Code of Civil Procedure] section 425.16's quick dismissal remedy. Instead of having to show a probability of success on the merits, the SLAPP plaintiff would be able to go back to the drawing board with a second opportunity to disguise the vexatious nature of the suit through more artful pleading. This would trigger a second round of pleadings, a fresh motion to strike, and inevitably another request for leave to amend." (Simmons, supra, at p. 1073.) Thus, Simmons was foreclosed from amending his cross-complaint because the court already had issued a tentative ruling to grant Allstate's anti-SLAPP motion. In contrast, in the case before us, there had been no tentative ruling prior to plaintiff's filing of the request for dismissal.
In Sylmar Air Conditioning v. Pueblo Contracting Services, Inc., supra, 122 Cal.App.4th 1049, Watts/Willowbrook Boys and Girls Club (Watts/Willowbrook) sued Pueblo Contracting Services, Inc. (Pueblo). Pueblo cross-complained against Watts/Willowbrook and various subcontractors, including Sylmar Air Conditioning (Sylmar). Sylmar, in turn, cross-complained against Pueblo. (Id. at pp. 1052-1053.) Pueblo filed its anti-SLAPP motion addressing the third cause of action in Sylmar's cross-complaint and also filed a demurrer. Sylmar opposed the motion. (Id. at pp. 1053, 1058.) "Three days before the SLAPP motion and demurrers were to be heard, Sylmar filed a first amended complaint. The third cause of action still alleged fraud, but it was pleaded in greater detail. [¶] ... [T]he trial court granted the SLAPP motion and issued a written decision setting forth its reasoning. The court struck the third cause of action and awarded attorney fees and costs to Pueblo. It also found the demurrers moot. [¶] ... [Then,] Pueblo filed a new SLAPP motion, directed at the third cause of action of the first amended complaint. At a status conference ... Sylmar voluntarily withdrew the third cause of action in the amended complaint and the new SLAPP motion was *881 taken off calendar. Sylmar then filed a timely notice of appeal from the order granting the first SLAPP motion." (Id. at pp. 1053-1054.)
On appeal, "Sylmar contend[ed] that the trial court erred in hearing the SLAPP motion because it filed a first amended complaint pursuant to [Code of Civil Procedure] section 472 prior to the hearing on the motion." (Sylmar, supra, 122 Cal.App.4th at p. 1054.) The appellate court concluded that "Sylmar received the benefit of [Code of Civil Procedure] section 472 [that permitted amendments] when it was permitted to file the first amended complaint." (Sylmar, supra, at p. 1054.) The appellate court then cited a number of cases standing for the proposition that "a plaintiff may not avoid liability for attorney fees and costs by voluntarily dismissing a cause of action to which a SLAPP motion is directed. [Citations.]" (Id. at pp. 1054-1055, citing among others, Pfeiffer Venice Properties v. Bernard, supra, 101 Cal.App.4th at pp. 218, 219.) Finding that an amendment of the complaint was not qualitatively different than a dismissal, the appellate court rejected the argument that "the issue of attorney fees and costs rendered moot even by an involuntary dismissal after a demurrer is sustained without leave to amend. [Citation.]" (Sylmar, supra, at p. 1055.)
(7) Sylmar, then cited, quoted and discussed Simmons v. Allstate Ins. Co., supra, 92 Cal.App.4th 1068. Although, Sylmar quoted directly from Simmons, it also overstated the rule derived therefrom. This language is critical. Simmons did not hold that parties lose their right to amend a pleading upon the filing of an anti-SLAPP motion by the opposition. Rather, Simmons stated that parties lose that right after a court has made an adverse ruling by finding the moving party met its burden of proof and finding a prima facie showing has been made.
(8) Here, when plaintiff filed the dismissal, the trial court had not issued a ruling on the merits, and the procedural posture was such that it was not inevitable that plaintiff's complaint would be stricken.
Therefore, trial had not "commenced," the dismissal filed by plaintiff was effective upon filing, and the trial court lacked the jurisdiction to rule on defendants' anti-SLAPP motion (Code Civ. Proc., § 425.16). The trial court only had jurisdiction to thereafter entertain a motion brought by defendants for attorney fees and costs.[3]


*882 V.

DISPOSITION
The order denying the anti-SLAPP motion is vacated. The matter is remanded to the trial court with directions that the case is to be dismissed without prejudice. Plaintiff is awarded costs on appeal.
Klein, P. J., and Croskey, J., concurred.
NOTES
[1]  "SLAPP is an acronym for `strategic lawsuit against public participation.' [Citation.]" (Vargas v. City of Salinas (2009) 46 Cal.4th 1, 8, fn. 1 [92 Cal.Rptr.3d 286, 205 P.3d 207].) Code of Civil Procedure section 425.16 establishes a motion-to-strike procedure to provide a remedy against "`lawsuits brought primarily to chill the valid exercise of the constitutional rights of freedom of speech and petition for the redress of grievances' (Code Civ. Proc., § 425.16, subd. (a)) ..." (Vargas, supra, at p. 8, fn. 1.)
[2]  As stated in Code of Civil Procedure section 581, a party's right to voluntary dismissal applies to the entire complaint or causes of action within the complaint. For simplicity, we refer only to the right to dismiss an entire complaint, as that is what is before us.
[3]  We expect that upon remand defendants will make a motion for attorney fees and costs. On the surface, permitting such a motion seems futile in that the trial court ultimately denied defendants' anti-SLAPP motion, signaling that defendants would not be entitled to attorney fees and costs. However, in light of the procedural posture of this case, we believe it is more prudent to return the case to the trial court to rule on any issues the parties may raise.
