@@ -114,6 +114,7 @@ export class GettingStartedPage extends EditorPane {
114
114
private tasExperimentService ?: ITASExperimentService ;
115
115
private previousSelection ?: string ;
116
116
private recentlyOpened : Promise < IRecentlyOpened > ;
117
+ private selectedTaskElement ?: HTMLDivElement ;
117
118
118
119
constructor (
119
120
@ICommandService private readonly commandService : ICommandService ,
@@ -287,13 +288,15 @@ export class GettingStartedPage extends EditorPane {
287
288
if ( this . editorInput . selectedTask === id && contractIfAlreadySelected ) {
288
289
this . previousSelection = this . editorInput . selectedTask ;
289
290
this . editorInput . selectedTask = undefined ;
291
+ this . selectedTaskElement = undefined ;
290
292
return ;
291
293
}
292
294
taskElement . style . height = `${ taskElement . scrollHeight } px` ;
293
295
if ( ! this . currentCategory || this . currentCategory . content . type !== 'items' ) {
294
296
throw Error ( 'cannot expand task for category of non items type' + this . currentCategory ?. id ) ;
295
297
}
296
298
this . editorInput . selectedTask = id ;
299
+ this . selectedTaskElement = taskElement ;
297
300
const taskToExpand = assertIsDefined ( this . currentCategory . content . items . find ( task => task . id === id ) ) ;
298
301
299
302
mediaElement . setAttribute ( 'alt' , taskToExpand . media . altText ) ;
@@ -594,6 +597,12 @@ export class GettingStartedPage extends EditorPane {
594
597
this . detailsScrollbar ?. scanDomNode ( ) ;
595
598
this . detailImageScrollbar ?. scanDomNode ( ) ;
596
599
this . container . classList [ size . height <= 685 ? 'add' : 'remove' ] ( 'height-constrained' ) ;
600
+
601
+
602
+ if ( this . selectedTaskElement ) {
603
+ this . selectedTaskElement . style . height = `` ; // unset or the scrollHeight will just be the old height
604
+ this . selectedTaskElement . style . height = `${ this . selectedTaskElement . scrollHeight } px` ;
605
+ }
597
606
}
598
607
599
608
private updateCategoryProgress ( ) {
0 commit comments