File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -598,8 +598,7 @@ export default class StateHolder extends React.Component {
598
598
599
599
// automark as read
600
600
const entry = this . state . entries . find ( ( entry ) => id === entry . id ) ;
601
- const autoMarkAsRead = selfoss . isAllowedToWrite ( ) && this . props . configuration . autoMarkAsRead && entry . unread == 1 ;
602
- if ( autoMarkAsRead ) {
601
+ if ( selfoss . isAllowedToWrite ( ) && this . props . configuration . autoMarkAsRead && entry . unread == 1 ) {
603
602
this . markEntryRead ( id , true ) ;
604
603
}
605
604
}
@@ -995,13 +994,15 @@ export default class StateHolder extends React.Component {
995
994
this . setSelectedEntry ( current ) ;
996
995
}
997
996
998
- const currentElement = document . querySelector ( `.entry[data-entry-id="${ current } "]` ) ;
997
+ window . requestAnimationFrame ( ( ) => {
998
+ const currentElement = document . querySelector ( `.entry[data-entry-id="${ current } "]` ) ;
999
999
1000
- // scroll to element
1001
- autoScroll ( currentElement ) ;
1000
+ // scroll to element
1001
+ autoScroll ( currentElement ) ;
1002
1002
1003
- // focus the title link for better keyboard navigation
1004
- currentElement . querySelector ( '.entry-title-link' ) . focus ( ) ;
1003
+ // focus the title link for better keyboard navigation
1004
+ currentElement . querySelector ( '.entry-title-link' ) . focus ( ) ;
1005
+ } ) ;
1005
1006
}
1006
1007
}
1007
1008
You can’t perform that action at this time.
0 commit comments