File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,12 @@ export abstract class AbstractKeyExplorer<T> extends AbstractExplorer<T> impleme
116116 public Update ( force : boolean = false ) {
117117 if ( ! this . active && ! force ) return ;
118118 this . highlighter . unhighlight ( ) ;
119- this . highlighter . highlight ( this . walker . getFocus ( true ) . getNodes ( ) ) ;
119+ let nodes = this . walker . getFocus ( true ) . getNodes ( ) ;
120+ if ( ! nodes . length ) {
121+ this . walker . refocus ( ) ;
122+ nodes = this . walker . getFocus ( ) . getNodes ( ) ;
123+ }
124+ this . highlighter . highlight ( nodes ) ;
120125 }
121126
122127 /**
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ declare namespace sre {
3030 deactivate ( ) : void ;
3131 speech ( ) : string ;
3232 move ( key : number ) : boolean ;
33+ refocus ( ) : void ;
3334 getFocus ( update ?: boolean ) : Focus ;
3435 update ( options : { [ key : string ] : string } ) : void ;
3536 }
You can’t perform that action at this time.
0 commit comments