fix: enhance focus handling by adding smooth scroll to content area (#2569)

This commit is contained in:
Luffy 2025-07-18 10:36:21 +08:00 committed by GitHub
parent 375c058e3e
commit 20d095b53c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -414,7 +414,11 @@ export function Events(Base) {
dom.find('#main');
// Move focus to content area
focusEl?.focus(settings);
if (focusEl) {
focusEl.focus(settings);
focusEl.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
return focusEl;
}