File tree Expand file tree Collapse file tree
packages/components/src/components/toolbar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { KeyboardKey } from '../../schema/enums';
88import type { OrientationPropType } from '../../schema/props/orientation' ;
99import { validateOrientation } from '../../schema/props/orientation' ;
1010import { delegateClick , setClick } from '../../utils/element-click' ;
11- import { delegateFocus } from '../../utils/element-focus' ;
11+ import { delegateFocus , setFocus } from '../../utils/element-focus' ;
1212
1313@Component ( {
1414 tag : 'kol-toolbar' ,
@@ -36,9 +36,7 @@ export class KolToolbar implements ToolbarAPI, FocusableElement {
3636 public async focus ( ) : Promise < void > {
3737 const firstEnabledItem = this . indexToElement . get ( this . currentIndex ) ;
3838 if ( firstEnabledItem ) {
39- return delegateFocus ( this . host ! , async ( ) => {
40- await ( firstEnabledItem as any ) . focus ?.( ) ;
41- } ) ;
39+ return delegateFocus ( this . host ! , ( ) => setFocus ( firstEnabledItem ) ) ;
4240 }
4341 }
4442
You can’t perform that action at this time.
0 commit comments