Skip to content

Commit 4ed5590

Browse files
authored
fix(blazor): prevent form defaul behavior (#691)
* fix(blazor): prevent form defaul behavior closes #688 * fmt
1 parent 7000c6c commit 4ed5590

File tree

19 files changed

+26
-25
lines changed

19 files changed

+26
-25
lines changed

templates/template-angular/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

templates/template-blazor/src/Pages/Home.razor

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
<img src="img/blazor.png" class="logo blazor" alt="Blazor logo"/>
1313
</a>
1414
</div>
15-
15+
1616
<p>Click on the Tauri and Blazor logos to learn more.</p>
17-
18-
<form class="row">
17+
18+
<form class="row" @submit="GreetAsync" @submit:preventDefault="true">
1919
<input id="greet-input" placeholder="Enter a name..." @bind="GreetInput"/>
20-
<button type="submit" @onclick="GreetAsync">Greet</button>
20+
<button type="submit">Greet</button>
2121
</form>
22-
22+
2323
<p>@GreetMsg</p>
2424
</div>
2525

2626
@code
2727
{
2828
private string? GreetInput { get; set; }
29-
29+
3030
private string? GreetMsg { get; set; }
3131

3232
private async Task GreetAsync()

templates/template-blazor/src/wwwroot/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

templates/template-leptos/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<meta charset="utf-8" />

templates/template-preact-ts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

templates/template-preact/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

templates/template-react-ts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

templates/template-react/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

templates/template-solid-ts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

templates/template-solid/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

0 commit comments

Comments
 (0)