Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page Breaks When More Than 23 Images Used on iPhone #345

Open
acadia-ai opened this issue Sep 27, 2023 · 0 comments
Open

Page Breaks When More Than 23 Images Used on iPhone #345

acadia-ai opened this issue Sep 27, 2023 · 0 comments

Comments

@acadia-ai
Copy link

acadia-ai commented Sep 27, 2023

Describe the bug
If there are more than 23 slides, it causes the page to reload multiple times before the page breaks on mobile devices, specifically iPhone.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Vue 3 component using <script setup>
  2. Add the carousel within the template.
  3. Iterate over the images and output the slides (setting to 24).
<template>
    <div>
        <Carousel :items-to-show="1" :autoplay="2000" :wrap-around="true">
            <Slide v-for="(image, index) in images" :key="index">
                <img class="w-full" :src="image.src" />
            </Slide>
        </Carousel>
    </div>
</template>

<script setup lang="ts">
import { resource } from '@/helpers';
import { Carousel, Slide } from 'vue3-carousel';
import 'vue3-carousel/dist/carousel.css';

const images = Array.from(Array(23).keys()).map((i) => ({
    src: resource(`/images/${i + 1}.png`),
}))
</script>

Expected behavior
Should work with however many images you choose.

Smartphone (please complete the following information):

  • Device: iPhone
  • OS: iOS
  • Browser Safari

Additional Context
I should add that this app is using a Laravel 10 backend and the Inertia stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant