File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
packages/webui/src/client/ui/SegmentTimeline Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -195,14 +195,18 @@ const SegmentTimelineContainerContent = withResolvedSegment(
195195 RundownViewEventBus . on ( RundownViewEvents . REWIND_SEGMENTS , this . onRewindSegment )
196196 RundownViewEventBus . on ( RundownViewEvents . GO_TO_PART , this . onGoToPart )
197197 RundownViewEventBus . on ( RundownViewEvents . GO_TO_PART_INSTANCE , this . onGoToPartInstance )
198- window . requestAnimationFrame ( ( ) => {
199- this . mountedTime = Date . now ( )
200- if ( this . state . isLiveSegment && this . props . followLiveSegments && ! this . isVisible ) {
201- scrollToSegment ( this . props . segmentId , true ) . catch ( ( error ) => {
202- if ( ! error . toString ( ) . match ( / a n o t h e r s c r o l l / ) ) console . warn ( error )
203- } )
204- }
205- } )
198+ // Delay is to ensure UI has settled before checking:
199+ setTimeout ( ( ) => {
200+ window . requestAnimationFrame ( ( ) => {
201+ this . mountedTime = Date . now ( )
202+ if ( this . state . isLiveSegment && this . props . followLiveSegments && ! this . isVisible ) {
203+ console . log ( 'SegmentTimelinecontainer is not visible' )
204+ scrollToSegment ( this . props . segmentId , true ) . catch ( ( error ) => {
205+ if ( ! error . toString ( ) . match ( / a n o t h e r s c r o l l / ) ) console . warn ( error )
206+ } )
207+ }
208+ } )
209+ } , 500 )
206210 window . addEventListener ( 'resize' , this . onWindowResize )
207211 this . updateMaxTimeScale ( )
208212 . then ( ( ) => this . showEntireSegment ( ) )
You can’t perform that action at this time.
0 commit comments