File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -81,15 +81,15 @@ export default {
8181 const items = this . getAllMenuItems ( )
8282 const currentIndex = this . getCurrentFocusIndex ( items )
8383 const targetIndex = currentIndex === 0 ? items . length - 1 : currentIndex - 1
84- this . setActive ( items [ targetIndex ] )
84+ this . setFocus ( items [ targetIndex ] )
8585 } ,
8686
8787 navigateDown ( e ) {
8888 e . preventDefault ( )
8989 const items = this . getAllMenuItems ( )
9090 const currentIndex = this . getCurrentFocusIndex ( items )
9191 const targetIndex = currentIndex === items . length - 1 ? 0 : currentIndex + 1
92- this . setActive ( items [ targetIndex ] )
92+ this . setFocus ( items [ targetIndex ] )
9393 } ,
9494
9595 handleEscape ( ) {
@@ -107,7 +107,7 @@ export default {
107107
108108 handleMouseOver ( e ) {
109109 if ( e . target . getAttribute ( 'role' ) === 'menuitem' ) {
110- this . setActive ( e . target )
110+ this . setFocus ( e . target )
111111 }
112112 } ,
113113
@@ -129,7 +129,7 @@ export default {
129129 return Array . prototype . findIndex . call ( items , item => item . hasAttribute ( 'data-focus' ) )
130130 } ,
131131
132- setActive ( el ) {
132+ setFocus ( el ) {
133133 this . clearFocus ( )
134134 el . setAttribute ( 'data-focus' , '' )
135135 this . refs . menu . setAttribute ( 'aria-activedescendant' , el . id )
You can’t perform that action at this time.
0 commit comments