mirror of
https://github.com/kennethreitz/kjvstudy.org.git
synced 2026-06-05 23:00:16 +00:00
Fix stuttering in chapter view keyboard navigation
Changed scrollIntoView behavior from 'smooth' to 'auto' to prevent overlapping scroll animations when holding down arrow keys. This eliminates stuttering and makes rapid navigation smooth. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -462,7 +462,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
selectedVerseIndex = -1;
|
||||
actionButtons[selectedActionIndex].classList.add('selected');
|
||||
actionButtons[selectedActionIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
@@ -478,9 +478,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
// Add selection to new verse
|
||||
verses[selectedVerseIndex].classList.add('selected');
|
||||
|
||||
// Scroll into view
|
||||
// Scroll into view with instant behavior to prevent stuttering when holding down keys
|
||||
verses[selectedVerseIndex].scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
behavior: 'auto',
|
||||
block: 'center'
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user