Skip to content

Commit

Permalink
Change key from tab into shift
Browse files Browse the repository at this point in the history
Tabキーは次の要素に移動するために使うので、補完キーをShiftに変更した
  • Loading branch information
sora32127 committed Apr 24, 2024
1 parent df0edcb commit d76a41a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/components/SubmitFormComponents/TextInputBoxAI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function TextInputBoxAI({
};

const handleSuggestions = (e: KeyboardEvent) => {
if (e.key === "Tab") {
if (e.key === "Shift") {
e.preventDefault();
commitSuggestions();
}
Expand Down Expand Up @@ -115,9 +115,9 @@ export default function TextInputBoxAI({
/>
{suggestions && (
<>
<p className="text-info mt-2">[補完候補]: {suggestions}</p>
<p className="text-base-content mt-2">
Tabキーまたはボタンを押して補完できます
<p className="text-base-content mt-2">[補完候補]: {suggestions}</p>
<p className="text-info mt-2">
Shiftキーまたはボタンを押して補完できます
</p>
<button
onClick={commitSuggestions}
Expand Down

0 comments on commit d76a41a

Please sign in to comment.