File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ export class MultiMediaChoiceOption {
268
268
closeButton . addEventListener ( 'click' , closeModal ) ;
269
269
270
270
// Add elements that should be tabbable is in this list
271
- const focusableElements = modal . querySelectorAll ( '.h5p-video, button:not([disabled])' ) ;
271
+ const focusableElements = modal . querySelectorAll ( '.h5p-video, button:not([disabled])' ) ;
272
272
const firstFocusable = focusableElements [ 0 ] ;
273
273
const lastFocusable = focusableElements [ focusableElements . length - 1 ] ;
274
274
@@ -281,8 +281,9 @@ export class MultiMediaChoiceOption {
281
281
// make choice options unavailable from tabs
282
282
if ( document . activeElement != firstFocusable && document . activeElement != lastFocusable ) {
283
283
firstFocusable . focus ( ) ;
284
+ event . preventDefault ( ) ;
284
285
}
285
- if ( event . shiftKey ) /* shift + tab */ {
286
+ else if ( event . shiftKey ) /* shift + tab */ {
286
287
if ( document . activeElement === firstFocusable ) {
287
288
lastFocusable . focus ( ) ;
288
289
event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments