Skip to content

Commit

Permalink
remove code fixed by enketo/enketo-core#817
Browse files Browse the repository at this point in the history
  • Loading branch information
m5r committed Nov 16, 2023
1 parent 109271b commit 365e9ed
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions webapp/src/ts/services/enketo.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ export class EnketoService {
window.history.pushState({ enketo_page_number: currentIndex }, '');
}
this.setupNavButtons($wrapper, currentIndex);
this.pauseMultimedia($wrapper);
}
this.forceRecalculate(form);
});
Expand All @@ -264,18 +263,10 @@ export class EnketoService {

this.setupNavButtons($wrapper, pageIndex);
this.forceRecalculate(form);
this.pauseMultimedia($wrapper);
return false;
});
}

// This code can be removed once this issue is fixed: https://github.com/enketo/enketo-core/issues/816
private pauseMultimedia($wrapper) {
$wrapper
.find('audio, video')
.each((idx, element) => element.pause());
}

private addPopStateHandler(form, $wrapper) {
$(window).on('popstate.enketo-pagemode', (event: any) => {
if (event.originalEvent &&
Expand Down

0 comments on commit 365e9ed

Please sign in to comment.