Skip to content

Conversation

terapotan
Copy link
Contributor

内容

Tabキーで自動スクロールしない問題を修正。

関連 Issue

ref #2599

スクリーンショット・動画など

横スクロール修正版

@terapotan terapotan requested a review from a team as a code owner March 9, 2025 09:09
@terapotan terapotan requested review from Hiroshiba and removed request for a team March 9, 2025 09:09
@voicevox-preview-pages
Copy link

voicevox-preview-pages bot commented Mar 9, 2025

🚀 プレビュー用ページを作成しました 🚀

更新時点でのコミットハッシュ:e64f6bf

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This pull request resolves the issue reported in #2599 by ensuring that the lyric input scrolls into view when the Tab key is pressed.

  • Added a scrollIntoView call to the lyric input element
  • Ensures consistent auto-scroll behavior when the element is focused

Reviewed Changes

File Description
src/components/Sing/SequencerLyricInput.vue Added scrollIntoView in the focus sequence to fix auto-scroll

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/components/Sing/SequencerLyricInput.vue:70

  • [nitpick] Consider adding tests to verify the auto-scroll behavior when the Tab key is pressed to ensure consistent results across browsers.
lyricInput.value?.scrollIntoView({ block: "nearest", inline: "nearest" });

Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

特に問題なさそう。

Copy link
Contributor

@sigprogramming sigprogramming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

なぜ #2118 でスクロールされなくなったのか調べてみたのですが、 Tabキーが押されたらLyricInputを再作成していた(ノートごとにLyricInputを作成していた)のを、 #2118 で再作成せずに再利用するように変更したのが原因っぽかったです。
再作成されないので再フォーカスも行われず(既にフォーカスしている)、フォーカスのタイミングで自動スクロールされなくなった、ということだと思います。

なので、この変更で良さそう!

@Hiroshiba Hiroshiba changed the title Tabキーで自動スクロールしない問題を修正(#2599) fix: Tabキーで自動スクロールしない問題を修正(#2599) Mar 10, 2025
@Hiroshiba Hiroshiba enabled auto-merge March 10, 2025 12:37
@Hiroshiba Hiroshiba added this pull request to the merge queue Mar 10, 2025
Merged via the queue into VOICEVOX:main with commit ccb70f7 Mar 10, 2025
11 checks passed
@terapotan terapotan deleted the FixTabNoteScrollBug branch March 10, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants