@@ -501,15 +501,14 @@ class TimedTextEditor extends React.Component {
501
501
const blockKey = currentBlock . key ;
502
502
const ranges = currentBlock . entityRanges ;
503
503
504
- for ( var idx in ranges ) {
505
- const range = ranges [ idx ] ;
504
+ for ( var rangeIdx in ranges ) {
505
+ const range = ranges [ rangeIdx ] ;
506
506
// Need to access entityMap and not currentBlock.data.words, as it seems to be not in sync with edits.
507
507
const word = entityMap [ range . key ] . data ;
508
508
509
509
if ( word . start <= this . props . currentTime ) {
510
510
currentFocus . blockKey = blockKey ;
511
511
currentFocus . offset = range . offset + range . length ;
512
- currentFocus . start = word . start ;
513
512
} else {
514
513
break ;
515
514
}
@@ -527,9 +526,9 @@ class TimedTextEditor extends React.Component {
527
526
const selectionState = this . state . editorState . getSelection ( ) ;
528
527
const selection = selectionState . merge ( {
529
528
anchorOffset : currentFocus . offset ,
529
+ anchorKey : currentFocus . blockKey ,
530
530
focusOffset : currentFocus . offset ,
531
531
focusKey : currentFocus . blockKey ,
532
- anchorKey : currentFocus . blockKey ,
533
532
} ) ;
534
533
535
534
const newState = EditorState . forceSelection ( this . state . editorState , selection ) ;
0 commit comments