@@ -224,7 +224,10 @@ export class PreviewViewModel extends Base {
224
224
this . updatePageList ( ) ;
225
225
this . show ( ) ;
226
226
}
227
-
227
+ private isSurveyRunning ( ) : boolean {
228
+ const state = this . survey ?. state ;
229
+ return state === "running" || state === "starting" ;
230
+ }
228
231
public buildActions ( ) {
229
232
const pageActions : Array < Action > = [ ] ;
230
233
const setNearPage : ( isNext : boolean ) => void = ( isNext : boolean ) => {
@@ -246,7 +249,7 @@ export class PreviewViewModel extends Base {
246
249
247
250
if ( this . prevPageAction ) {
248
251
this . prevPageAction . visible = < any > new ComputedUpdater < boolean > ( ( ) => {
249
- const isRunning = this . survey . state === "running" ;
252
+ const isRunning = this . isSurveyRunning ( ) ;
250
253
const isActiveTab = this . getTabName ( ) === this . surveyProvider . activeTab ;
251
254
return notShortCircuitAnd ( this . isRunning , isActiveTab , this . pageListItems . length > 1 ) && isRunning ;
252
255
} ) ;
@@ -279,11 +282,11 @@ export class PreviewViewModel extends Base {
279
282
} ) ;
280
283
pageActions . push ( this . selectPageAction ) ;
281
284
this . selectPageAction . visible = < any > new ComputedUpdater < boolean > ( ( ) => {
282
- return this . survey . state === "running" ;
285
+ return this . isSurveyRunning ( ) ;
283
286
} ) ;
284
287
if ( this . nextPageAction ) {
285
288
this . nextPageAction . visible = < any > new ComputedUpdater < boolean > ( ( ) => {
286
- const isRunning = this . survey . state === "running" ;
289
+ const isRunning = this . isSurveyRunning ( ) ;
287
290
const isActiveTab = this . getTabName ( ) === this . surveyProvider . activeTab ;
288
291
return notShortCircuitAnd ( this . isRunning , isActiveTab , this . pageListItems . length > 1 ) && isRunning ;
289
292
} ) ;
0 commit comments