Skip to content

Mobile: scrolling a tall modal triggers pull-to-refresh and reloads the page #64

Description

@gnacho

On mobile, opening a tall dialog (e.g. the replace/add-vdev one) anchors it at the bottom of the screen. Its action button ends up out of view, so the user has to scroll the dialog body. That gesture bubbles to the global pull-to-refresh handler (touchmove on window with scrollY<=0), which accumulates the pull and calls window.location.reload() once the threshold is crossed. Result: the page reloads and the dialog (and its action button) disappears before the user can tap it.

Steps to reproduce:

  1. Open the app on a mobile viewport.
  2. Open a pool action dialog whose content is taller than the viewport (e.g. replace disk).
  3. Swipe up to scroll the dialog content down to the action button.
  4. The pull threshold is crossed and the whole page reloads, closing the dialog.

Expected: scrolling inside a modal must not trigger pull-to-refresh; only a pull from the page top with no modal open should reload.

The pull-to-refresh handler attaches to window and never checks whether the touch originated inside the modal overlay.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions