Skip to content

Commit

Permalink
enhance(frontend): 검색과 같은 입력 블록에서 Enter를 입력하면 자동으로 가상 키보드를 숨김
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Oct 8, 2024
1 parent caa892d commit 89c9876
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGE

### Client
- Enhance: 업데이트 및 마이그레이션 알림에서 CherryPick의 변경 사항만 표시함
- Enhance: 검색과 같은 입력 블록에서 `Enter`를 입력하면 자동으로 가상 키보드를 숨김

---

Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/src/components/MkInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ const onKeydown = (ev: KeyboardEvent) => {
emit('keydown', ev);

if (ev.code === 'Enter') {
focused.value = false;
inputEl.value.blur();
emit('enter', ev);
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/search.event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<div class="_gaps">
<div class="_gaps">
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter="search">
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter.prevent="search">
<template #prefix><i class="ti ti-search"></i></template>
</MkInput>
<MkRadios v-model="searchOrigin" @update:modelValue="search()">
Expand Down

0 comments on commit 89c9876

Please sign in to comment.