File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
![ logo] ( _media/icon.svg )
4
4
5
- # docsify <small >5.0.0-rc.1</small >
5
+ # docsify <small >5.0.0-rc.1</small > : id =docsify
6
6
7
7
> A magical documentation site generator
8
8
Original file line number Diff line number Diff line change @@ -415,9 +415,16 @@ export function Events(Base) {
415
415
416
416
// Move focus to content area
417
417
if ( focusEl ) {
418
- focusEl . focus ( settings ) ;
418
+ if ( ! focusEl . hasAttribute ( 'tabindex' ) ) {
419
+ focusEl . setAttribute ( 'tabindex' , '-1' ) ;
420
+ focusEl . setAttribute ( 'data-added-tabindex' , 'true' ) ;
421
+ }
419
422
420
- focusEl . scrollIntoView ( { behavior : 'smooth' , block : 'start' } ) ;
423
+ if ( focusEl . hasAttribute ( 'data-added-tabindex' ) ) {
424
+ focusEl . scrollIntoView ( { behavior : 'smooth' } ) ;
425
+ }
426
+
427
+ focusEl . focus ( settings ) ;
421
428
}
422
429
423
430
return focusEl ;
You can’t perform that action at this time.
0 commit comments