Unpoly modal scroll jump with Tabler · Issue #799 · unpoly/unpoly · GitHub
Skip to content

Unpoly modal scroll jump with Tabler #799

Open

Description

@EugeneDae

Bug description

When using Unpoly modals together with Tabler (Bootstrap 5 based UI kit), the page scroll position jumps upward when the modal opens. Workaround/fix is provided below. I'm not sure if this is an Unpoly bug.

Reproduction project

Minimal reproducible demo:
https://stackblitz.com/edit/empty-unpoly-project-x4dpyzvf?file=index.html

Steps to reproduce the behavior:

  1. Go to reproduction project linked above.
  2. Scroll down the page.
  3. Click on the "Open modal" button.

Expected behavior

Opening a modal should not change the page scroll position.

Browser version

Latest Chrome, Safari on macOS.

Additional context

Fix/workaround:

<style>
:root { height: auto; }
.page { min-height: 100vh; }
</style>

Activity

  1. hiSandog commented on Jun 30, 2026

    @hiSandog

    The provided workaround suggests this is caused by a height/min-height interaction between Tabler's page wrapper and Unpoly's modal scroll locking. It would be helpful to know whether the jump happens at the moment Unpoly applies its overlay classes, or only after focus is moved into the modal. If it is the former, a minimal CSS-only regression case around root/page height could make this easier to fix without special-casing Tabler.

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