Skip to content

Commit

Permalink
Merge pull request #270 from traPtitech/fix/type_button
Browse files Browse the repository at this point in the history
fix/フォーム内に入る / 入りそうなボタンに type="button" を付ける
  • Loading branch information
anko9801 authored Aug 31, 2024
2 parents 17c3559 + ea69b8a commit 0ad9ac3
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/newRequest/NewRequestFileForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function removeFile(index: number) {
<button
aria-label="ファイルを削除"
class="absolute top-0 right-0 h-6 w-6"
type="button"
@click="removeFile(index)">
<XCircleIcon />
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/newRequest/NewRequestTargets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function handleRemoveTarget(index: number) {
v-if="targets.length > 1"
aria-label="払い戻し対象者を削除"
class="flex"
type="button"
@click="handleRemoveTarget(i)">
<TrashIcon class="w-6 text-error-primary" />
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/newTransaction/NewTransactionTarget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function handleRemoveTarget(index: number) {
<button
v-if="props.targets.length > 1"
class="flex"
type="button"
@click="handleRemoveTarget(i)">
<TrashIcon class="w-6 text-error-primary" />
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/requestDetail/RequestFiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ await fetchFiles(request.value?.files ?? [])
<!--画像の色によっては見えづらい(新規作成画面も)-->
<button
class="absolute top-0 right-0 h-8 w-8"
type="button"
@click="removeFile(file.id)">
<XCircleIcon />
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/shared/FloatingMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ onUnmounted(() => {
class="hover:bg-hover-primary rounded p-1">
<button
class="w-full h-full text-left"
type="button"
@click="handleSelectOption(option.value)">
{{ option.key }}
</button>
Expand Down
3 changes: 2 additions & 1 deletion src/components/shared/InputSelectSingle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ onUnmounted(() => {
@focus="isDropdownOpen = true"
@keydown="handleKeydown" />
</div>
<button v-if="selectedValue" @click="removeValue">×</button>
<button v-if="selectedValue" type="button" @click="removeValue">×</button>
<ChevronDownIcon class="h-4 w-4" />
</div>
<ul
Expand All @@ -224,6 +224,7 @@ onUnmounted(() => {
}`">
<button
class="h-full w-full px-4 py-1 text-left focus:outline-none"
type="button"
@click="selectValue(option)"
@keydown="handleKeydown">
{{ option.key }}
Expand Down
2 changes: 2 additions & 0 deletions src/components/shared/MarkdownTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ function changeCurrentTab(tab: TabType) {
? 'bg-surface-primary border-t border-x border-surface-secondary'
: 'bg-hover-secondary'
}`"
type="button"
@click="changeCurrentTab('input')">
入力
</button>
Expand All @@ -66,6 +67,7 @@ function changeCurrentTab(tab: TabType) {
? 'bg-surface-primary border-t border-x border-surface-secondary'
: 'bg-hover-secondary'
}`"
type="button"
@click="changeCurrentTab('preview')">
プレビュー
</button>
Expand Down

0 comments on commit 0ad9ac3

Please sign in to comment.