Skip to content

Commit

Permalink
Merge branch 'release-30.29.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 30, 2025
2 parents 2a56af6 + 56e2b26 commit c08d660
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion views/js/loader/taoQtiItem.min.js.map

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions views/js/qtiCreator/plugins/panel/itemViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,17 @@ define([
}
).then(viewer => {
viewer.on('ready', () => {
// Force to restore the context after rendering the item.
// This is needed as the editor needs to access the context of the item being edited.
// Otherwise, the editor might not work properly.
viewer.getRunner().on('renderitem', restoreCreatorContext);
restoreCreatorContext();
const preventAutoPlay = () => {
$viewerContainer.find('audio, video').each((i, media) => {
media.pause();
});
// Force to restore the context after rendering the item.
// This is needed as the editor needs to access the context of the item being edited.
// Otherwise, the editor might not work properly.
restoreCreatorContext();
};
viewer.getRunner().on('renderitem', preventAutoPlay);
preventAutoPlay();
});
});

Expand Down

0 comments on commit c08d660

Please sign in to comment.