File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,6 @@ class MarkdownButtonElement extends HTMLElement {
33
33
}
34
34
35
35
connectedCallback ( ) {
36
- if ( ! this . hasAttribute ( 'tabindex' ) ) {
37
- this . setAttribute ( 'tabindex' , '-1' )
38
- }
39
-
40
36
if ( ! this . hasAttribute ( 'role' ) ) {
41
37
this . setAttribute ( 'role' , 'button' )
42
38
}
@@ -251,8 +247,11 @@ class MarkdownToolbarElement extends HTMLElement {
251
247
this . field . addEventListener ( 'keydown' , fn )
252
248
shortcutListeners . set ( this , fn )
253
249
}
254
- const firstTabIndex = getButtons ( this ) [ 0 ]
255
- if ( firstTabIndex ) firstTabIndex . setAttribute ( 'tabindex' , '0' )
250
+ let tabindex = '0'
251
+ for ( const button of getButtons ( this ) ) {
252
+ button . setAttribute ( 'tabindex' , tabindex )
253
+ if ( tabindex === '0' ) tabindex = '-1'
254
+ }
256
255
}
257
256
258
257
disconnectedCallback ( ) {
You can’t perform that action at this time.
0 commit comments