We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be53467 commit fd8027dCopy full SHA for fd8027d
2 files changed
docs/_coverpage.md
@@ -2,7 +2,7 @@
2
3

4
5
-# docsify <small>5.0.0-rc.1</small>
+# docsify <small>5.0.0-rc.1</small> :id=docsify
6
7
> A magical documentation site generator
8
src/core/event/index.js
@@ -415,9 +415,16 @@ export function Events(Base) {
415
416
// Move focus to content area
417
if (focusEl) {
418
- focusEl.focus(settings);
+ if (!focusEl.hasAttribute('tabindex')) {
419
+ focusEl.setAttribute('tabindex', '-1');
420
+ focusEl.setAttribute('data-added-tabindex', 'true');
421
+ }
422
- focusEl.scrollIntoView({ behavior: 'smooth', block: 'start' });
423
+ if (focusEl.hasAttribute('data-added-tabindex')) {
424
+ focusEl.scrollIntoView({ behavior: 'smooth' });
425
426
+
427
+ focusEl.focus(settings);
428
}
429
430
return focusEl;
0 commit comments