shipshapecode / shepherd

Guide your users through a tour of your app
https://shepherdjs.dev
Other
13.05k stars 645 forks source link

Shepherd.js modal not scrollable on iOS devices in Vue 3 and Quasar project #2978

Open komaromiGyorgy opened 2 months ago

komaromiGyorgy commented 2 months ago

Description

I'm experiencing an issue where the Shepherd.js modal is not scrollable on iOS devices (iPhone and iPad) when used within a Vue 3 and Quasar project. The modal works as expected on other platforms (Android devices and desktop browsers), but on iOS, users cannot scroll through the modal content, making it unusable for content that exceeds the viewport height.

Expected Behavior

The Shepherd.js modal should be scrollable on iOS devices, allowing users to view all content within the modal by scrolling vertically.

Current Behavior

Steps to Reproduce

  1. Set up a Vue 3 project.
  2. Install and configure Shepherd.js to display a modal with content exceeding the viewport height.
  3. Open the project on an iOS device (iPhone or iPad) using Safari.
  4. Trigger the Shepherd.js modal.
  5. Attempt to scroll within the modal content.

Alternatively

You can go to the ShepherdJS home page and when the shepherd modal comes add more content to it by duplicating the current paragraphs until it becomes larger than the viewport height

Environment

Attempts to Resolve

I have tried the following solutions without success:

  1. Adding -webkit-overflow-scrolling: touch:

    .platform-ios
     .shepherd-content
       -webkit-overflow-scrolling: touch
       max-height: 70vh
  2. Changing max-height units:

    • Replaced 70dvh with 70vh.
  3. Adjusting overflow-y:

    • Changed overflow-y: auto to overflow-y: scroll.
  4. Modifying .shepherd-element positioning:

    .shepherd-element
     position: absolute
     top: 50%
     left: 50%
     transform: translate(-50%, -50%)
     max-height: 90vh
     overflow: visible
  5. Ensuring no parent elements have overflow: hidden or position: fixed.

  6. Trying to make the whole viewport scrollable by allowing the modal to overflow

Despite these attempts, the modal remains non-scrollable on iOS devices.

Additional Information

Request

I would appreciate any guidance on resolving this issue. Specifically:

Thank You!

chuckcarpenter commented 1 month ago

@komaromiGyorgy just a heads up that we've seen this issue and does seem like a bug. I don't have any obvious fix as of now and we've definitely had tours in the past where this worked, so not clear when it was introduced. Digging into ideas for a fix, but please let us know if you find something that works.

chuckcarpenter commented 1 month ago

Another follow up, I came across this example with a similar issue in mobile Safari, so I think it's device specific https://xop8k.csb.app/

RobbieTheWagner commented 1 month ago

I might be completely wrong here, but I remember there being some framework or library folks were using and it messed with the styles because it wrapped stuff in shadow DOM or something. Is this ringing any bells or possibly the issue here?

komaromiGyorgy commented 1 month ago

@RobbieTheWagner I don’t think so. I tried reproducing on the docs website by just duplicating the text inside the body of the modal and the scrolling issue is present there as well.