Skip to content

Unpoly modal scroll jump with Tabler #799

@EugeneDae

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions