GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Scrolling is not working using the sphinx_rtd_theme in devpi-web · Issue #1105 · devpi/devpi

Scrolling is not working using the sphinx_rtd_theme in devpi-web #1105

New issue
Copy link
New issue
Copy link
Open
Open
Scrolling is not working using the sphinx_rtd_theme in devpi-web#1105
Copy link

Description

@Stefanhg
Stefanhg
opened on Dec 2, 2025
Issue body actions

Hello,

While discussing in #1104 we concluded that the iframe is facing issues with scrolling.
I spend a bit of time with copilot debugging this and found that it was resolved by changing:

// In docview.js - onIFrameLoad function
$docHtml.css('overflow-y', 'hidden');
$docBody.css('overflow-y', 'hidden');

to

// In docview.js - onIFrameLoad function
$docHtml.css('overflow-y', 'visible');
$docBody.css('overflow-y', 'visible');

resolved the issue. (with a bit of extra to make the test work)
If @fschulze can approve me adding this fix, i'll make a PR for it.

A bit of extra feedback from Copilot:

Proposed Fix

Solution 1: Change overflow-y: hidden to overflow-y: visible (Minimal Change)

File: devpi_web/static/docview.js

function onIFrameLoad(event) {
// ...existing code...

// BEFORE (blocks scrolling):
$docHtml.css('height', 'auto');
$docHtml.css('overflow-y', 'hidden');  // ❌
$docBody.css('height', 'auto');
$docBody.css('overflow-y', 'hidden');  // ❌

// AFTER (enables scrolling):
$docHtml.css('height', 'auto');
$docHtml.css('overflow-y', 'visible');  // ✅ or 'auto'
$docBody.css('height', 'auto');
$docBody.css('overflow-y', 'visible');  // ✅ or 'auto'

// ...existing code...

}
Rationale:

overflow-y: visible allows content to overflow naturally, enabling the ResizeObserver to measure the true content height
The parent page's scrollbar can still handle scrolling (the intended behavior)
If auto-resize works correctly, the iframe will be sized properly; if it fails, users can still scroll
Alternative: Use overflow-y: auto instead of visible if you want the iframe to have its own scrollbar as a fallback.

Solution 2: Remove Auto-Resize, Use Flexbox Layout (Better UX)

For a more robust solution, consider simplifying the approach:

File: devpi_web/templates/+doc.pt (or equivalent)

<style> body { display: flex; flex-direction: column; min-height: 100vh; } .header { flex-shrink: 0; } .iframe { flex: 1; /* Grows to fill available space */ overflow: auto; } iframe#devpi-doc { width: 100%; height: 100%; } footer { flex-shrink: 0; } </style>

File: devpi_web/static/docview.js

// Simplify or remove the complex auto-resize logic
// Let CSS handle the layout
Benefits:

More reliable (no complex JavaScript height calculations)
Works with CORS restrictions (no need to access iframe.contentWindow.document)
Better browser compatibility
Iframe has its own scrollbar (standard web behavior)

Activity

  1. bwilli66 commented on May 14, 2026

    @bwilli66
    bwilli66
    on May 14, 2026
    More actions

    I ran into a similar issue, tried this suggested fix:

    function onIFrameLoad(event) {
        // ...existing code...
    
        // BEFORE (blocks scrolling):
        $docHtml.css('height', 'auto');
        $docHtml.css('overflow-y', 'hidden');  // ❌
        $docBody.css('height', 'auto');
        $docBody.css('overflow-y', 'hidden');  // ❌
    
        // AFTER (enables scrolling):
        $docHtml.css('height', 'auto');
        $docHtml.css('overflow-y', 'visible');  // ✅ or 'auto'
        $docBody.css('height', 'auto');
        $docBody.css('overflow-y', 'visible');  // ✅ or 'auto'
    
        // ...existing code...
    }

    I found that to get that solution to work, I also had to add

    iframe.setAttribute('scrolling', 'auto');

    I added it here

    function onIFrameLoad(event) {
        // ...existing code...
        $docHtml.css('height', 'auto');
        $docHtml.css('overflow-y', 'visible'); 
        $docBody.css('height', 'auto');
        $docBody.css('overflow-y', 'visible'); 
        iframe.setAttribute('scrolling', 'auto') // <----------------- here
        // ...existing code...
    }

    Just FYI for those attempting the "Minimal Change" approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.