Skip to content

fix: correct PDF viewer page count and input handling #502

Merged
YOGESH-08 merged 3 commits intoCodeChefVIT:stagingfrom
Rithish-2914:fix/pdf-viewer-page-count
Apr 21, 2026
Merged

fix: correct PDF viewer page count and input handling #502
YOGESH-08 merged 3 commits intoCodeChefVIT:stagingfrom
Rithish-2914:fix/pdf-viewer-page-count

Conversation

@Rithish-2914
Copy link
Copy Markdown
Contributor

@Rithish-2914 Rithish-2914 commented Apr 21, 2026

Purpose
Fix incorrect PDF page count display ("1 of 0") and improve page input behavior in the new EmbedPDF viewer.

Solves
#498

Changes
Fixed page count showing incorrect value before PDF loads
Replaced fallback 1 with "..." for better UX
Synced page number with actual viewer state
Improved input handling:
Clear on focus
Restore current page on blur
Prevent invalid page navigation
Handled async totalPages safely

Showcase
Page count now shows 1 of ... while loading
Updates correctly after PDF loads
Input behaves smoothly without glitches

Notes
Uses new EmbedPDF-based viewer
No backend/API changes
Improves overall UX and stability of PDF navigation

@YOGESH-08 YOGESH-08 changed the title fix: correct PDF viewer page count and input handling fix: correct PDF viewer page count and input handling #498 Apr 21, 2026
@YOGESH-08 YOGESH-08 changed the title fix: correct PDF viewer page count and input handling #498 fix: correct PDF viewer page count and input handling Apr 21, 2026
@YOGESH-08 YOGESH-08 merged commit 1948b29 into CodeChefVIT:staging Apr 21, 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