mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
fix: enhance focus handling by adding smooth scroll to content area (#2569)
This commit is contained in:
parent
375c058e3e
commit
20d095b53c
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user