Skip to content

Fix epub issue - #517

Merged
uyscuti-wiki merged 3 commits into
righttolearn:masterfrom
azizullahsaeidi:fix-epub-issue
Aug 5, 2026
Merged

Fix epub issue#517
uyscuti-wiki merged 3 commits into
righttolearn:masterfrom
azizullahsaeidi:fix-epub-issue

Conversation

@azizullahsaeidi

@azizullahsaeidi azizullahsaeidi commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

This PR belongs to this Jira ticket

What this PR does

Fixes the bug where the ePUB viewer wasn't initializing and displaying.

Why it was happening

The JS script was crashing on load because it was trying to update elements (like buttons and progress bars) that didn't actually exist with those IDs in the Blade file yet. On top of that, the container had the d-none class on it, keeping it completely hidden.

Changes made

  • resources_view.blade.php: Removed the d-none class from the main viewer wrapper and added the missing element IDs (prevBtn, nextBtn, progressBar, and epubStatus) so the JS can actually find them.
  • epub.jsx: Added some quick if checks inside the control, progress, and status update functions so the script won't hard-crash if an element is missing or takes a second to load.

Please run this command

npm run build

@uyscuti-wiki uyscuti-wiki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, Aziz. Thank you!

@uyscuti-wiki
uyscuti-wiki merged commit 4020dbc into righttolearn:master Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants