Fix white line at bottom of iframe kiwix/kiwix-tools#809#1288
Fix white line at bottom of iframe kiwix/kiwix-tools#809#1288zeyad-elkholy wants to merge 3 commits intokiwix:mainfrom
Conversation
|
Fixes kiwix/kiwix-tools#809 |
|
🎉 sweet!! I hope this works on all dependents of libkiwix, but it should. Looks like iOS and Android are webviews. Still could be scaffolding that gets changed with this, and I'm sure someone can test it! |
|
i don't know to be honest but i don't see smth wrong in web, so check it on safari, it works in firefox |
|
@zeyad-elkholy Thank you very much for your PR. I have assigned reviewers and will test things myself. Give us a few days to complete the review. |
There was a problem hiding this comment.
Pull request overview
This PR aims to fix the bottom gap/white line caused by hardcoded iframe height calculations by switching the viewer layout to a CSS flexbox-based sizing approach.
Changes:
- Added inline flexbox CSS in
static/viewer.htmlto make the iframe naturally fill remaining viewport height. - Disabled the JavaScript-based iframe height calculation previously performed on viewport changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
static/viewer.html |
Adds inline flexbox rules intended to make the toolbar + iframe layout fill the viewport without a bottom gap. |
static/skin/viewer.js |
Comments out the resize-based iframe height math in handle_visual_viewport_change(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
veloman-yunkan
left a comment
There was a problem hiding this comment.
I didn't test the fix (leaving it to @kelson42). If testing doesn't reveal any problems and the fix is going to be merged then we should simply drop the handle_visual_viewport_change() function (as suggested by Copilot).
Also, the cacheids in the server unit-test must be updated.
|
@kelson42 @veloman-yunkan i removed |
|
@kelson42 This PR should be merged as a single (squashed) commit. |
|
@kelson42 could you review or merge the PR plz if u have time? |


Fixes kiwix/kiwix-tools#809
I removed the hardcoded Javascript math that was calculating the iframe height with an arbitrary - 4 pixel offset. I replaced it with the CSS Flexbox approach (display: flex, flex: 1) on the html, body, and iframe elements to allow it to scale naturally without leaving a gap at the bottom.