Skip to content

Commit dfae661

Browse files
bcakmakogludevhus
andcommitted
fix(controls): add type="button" to avoid form submissions (#1911) (#1912)
* fix(controls): add `type="button"` to avoid form submissions (#1911) * chore(changeset): add --------- Co-authored-by: Hossam Hassan <[email protected]>
1 parent a43da6f commit dfae661

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/clever-rabbits-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/controls": patch
3+
---
4+
5+
Add `type="button"` to control buttons to avoid form submission if controls are nested in a form element.

packages/controls/src/ControlButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
</script>
77

88
<template>
9-
<button class="vue-flow__controls-button">
9+
<button type="button" class="vue-flow__controls-button">
1010
<slot />
1111
</button>
1212
</template>

0 commit comments

Comments
 (0)