Skip to content

Inspecting the slider in Safari and Chrome will eventually kill the browser #740

@MartinHaun

Description

@MartinHaun

Checks

Version

v4.0.0 with grid extension 0.4.0

Description

Inspecting the slider in Safari on M1 Monterey 12.2.1 with Safari 15.3 and Chrome 99.0.4844.84 will eventually crash both browsers with these settings:

image

It will worsen quickly if i drag the inspecter back and forth while testing responsive modes (inspector on the right side of the browser).

It might be (another) issue on my end though.

Can provide video privately if needed as the project is not public yet.

Reproduction Link

No response

Steps to Reproduce

Slider with the following settings:

new Splide( '#splide-statements', {
            type: 'loop',
            perPage:1,
            gap: '1rem',
            lazyLoad: 'nearby',
            drag: true,
            pagination:false,
            padding: '2rem',            
            mediaQuery: 'min', // Work with min-width instead of max-width for breakpoint definitions
            breakpoints: {
                1400: {
                    perPage: 4,
                },
                1200: {
                    perPage: 3,
                    grid: {
                        rows: 2,
                        gap: {
                            row: '2rem',
                        },
                    },
                    gap: '2rem',
                },
                600: {
                    perPage: 2,
                    grid: {
                        rows: 2,
                        gap: {
                            row: '1.5rem',
                        },
                    },
                    gap: '1.5rem',
                    drag: 'free',
                    snap: true, 
                    padding: '5rem',  
                },
            },
        }).mount( window.splide.Extensions );

Markup (Hubl):

{# Carousel #}
        <div class="splide statements__carousel" id="splide-statements" role="group" aria-label="Dot Legal statements">
            <div class="splide__track">
                <ul class="splide__list">
                    {% for statement in module.statement %}
                        <li class="splide__slide">
                            <div class="statements__statement statement">
                                <div class="statement__intro">
                                    {# Image #}
                                    <div class="statement__image">
                                        <img data-splide-lazy="{{ statement.image.src }}" alt="{{ statement.image.alt }}">
                                    </div>
                                    {# Intro #}
                                    <div class="statement__info">                                    
                                        {# Name #}
                                        {{ statement.full_name }}
                                        {# Title #}                                            
                                        <span>{{ statement.job_title }}</span>
                                    </div>
                                </div>
                                {# Body #}
                                <div class="statement__body">
                                    {# Description #}
                                    {{ statement.the_statement|truncate(200, false, '...') }}
                                </div>
                            </div>
                        </li>
                    {% endfor %}
                </ul>
            </div>
            {# Custom arrows #}
            <div class="splide__arrows">
                <button class="splide__arrow splide__arrow--prev">
                    Prev
                </button>
                <button class="splide__arrow splide__arrow--next">
                    Next
                </button>
            </div>
        </div>

Open inspector, drag it around to test responsive modes, inspector should slow down and eventually crash.

Up until now the browser doesn't seem to crash if I poke around the slider without inspecting it.

Expected Behaviour

Non-chrashing inspector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions