Skip to content

Commit

Permalink
fix: make scorm panel cover entire height in fullscreen mode (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danyal-Faheem authored Feb 6, 2025
1 parent 426a8d0 commit d9c8f93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/20250203_142818_danyal.faheem_HEAD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Make scorm panel and navigation menu cover the entire height of the display in fullscreen. (by @Danyal-Faheem)
8 changes: 7 additions & 1 deletion openedxscorm/static/js/src/scormxblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ function ScormXBlock(runtime, element, settings) {
if (settings.block_height > screen.height) {
$(e.target).css("height", screen.height);
}
// Override height and cover entire display in fullscreen
$(e.target).find(".scorm-panel").css("height", "100%");
$(e.target).find(".scorm-pane").css("height", "100%");
} else {
$(e.target).removeClass("fullscreen-enabled");
$(e.target).css("height", settings.block_height);
// Revert back to custom height on fullscreen exit
$(e.target).removeAttr("style");
$(e.target).find(".scorm-panel").removeAttr("style");
$(e.target).find(".scorm-pane").css("height", settings.block_height);
}
// This is required to trigger the actual content resize in some packages
window.dispatchEvent(new Event('resize'));
Expand Down

0 comments on commit d9c8f93

Please sign in to comment.