Skip to content

Commit 0b369de

Browse files
Fix buttons causing form submissions, closes #35
1 parent 648561e commit 0b369de

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## Next
4+
- Fix buttons causing form submissions
5+
36
## 2.2.3 - 2022 Nov 10
47
- Improve Tailwind compatibility
58

src/lib/DatePicker.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
<div class="tab-container" tabindex="-1">
206206
<div class="top">
207207
<button
208+
type="button"
208209
class="page-button"
209210
tabindex="-1"
210211
on:click={() => setMonth(browseDate.getMonth() - 1)}
@@ -267,6 +268,7 @@
267268
>
268269
</div>
269270
<button
271+
type="button"
270272
class="page-button"
271273
tabindex="-1"
272274
on:click={() => setMonth(browseDate.getMonth() + 1)}

src/routes/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
/></svg
6565
>
6666
</a>
67-
<button class="icon theme-toggle" on:click={toggleTheme}>
67+
<button type="button" class="icon theme-toggle" on:click={toggleTheme}>
6868
<svg
6969
xmlns="http://www.w3.org/2000/svg"
7070
enable-background="new 0 0 24 24"

0 commit comments

Comments
 (0)