Scroll Behavior Issue in Bootstrap 4.4.1 Accordion Component on Google Chrome - Possible Bug?

I've been using Bootstrap accordions for quite some time, but a new issue has recently cropped up.

If you play around with the code below (preferably in full screen mode), scroll down until the accordion is visible, then open the middle card by toggling it, you'll notice that the page scrolls in a strange manner (you'll see what I mean once you try it).

This problem seems to occur only when cards are toggled below the currently active card.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Accordion Test</title>

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>

<body style="height: 200vh;">
    <div class="container-fluid text-center d-flex bg-light" style="height: 500px">
        <div class="row align-items-center mx-auto">
            <div class="col">
                <p class="my-auto mb-0">Container to push accordion down.</p>
            </div>
        </div>        
    </div>

    <div class="col-6 offset-3 mt-5">
        <div class="accordion" id="exampleAccordion">
            <div class="card">
                <div class="card-header bg-light" id="exampleAccordionHeadingOne">
                    <h2 class="mb-0">
                        <button class="btn btn-link btn-block text-capitalize" type="button" data-toggle="collapse" data-target="#exampleAccordionCollapseOne" aria-expanded="true" aria-controls="exampleAccordionCollapseOne">
                            Lorem ipsum dolor sit
                        </button>
                    </h2>
                </div>
                <div id="exampleAccordionCollapseOne" class="collapse show" aria-labelledby="exampleAccordionHeadingOne" data-parent="#exampleAccordion">
                    <div class="card-body">
                        <p class="mb-0">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Vitae dicta odio, corrupti minus aliquam repellat unde, sapiente quo ea corporis aut est soluta ad eveniet molestiae magnam fugiat sequi nostrum blanditiis molestias ducimus! Eum iure eveniet magnam ipsam illum reiciendis. Eius itaque neque, vitae non, placeat deserunt id expedita aliquam, quaerat quo laudantium distinctio. Rerum neque laboriosam fugit quis aut, optio obcaecati nam soluta error enim fuga perferendis doloremque pariatur! Tempora est cupiditate nulla, tenetur accusantium corrupti, quia distinctio recusandae obcaecati, voluptatum explicabo et debitis dolorum blanditiis? Nostrum nam tenetur animi amet, recusandae, delectus at magnam porro deserunt facilis ipsam.</p>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header bg-light" id="exampleAccordionHeadingTwo">
                    <h2 class="mb-0">
                        <button class="btn btn-link btn-block text-capitalize collapsed" type="button" data-toggle="collapse" data-target="#exampleAccordionCollapseTwo" aria-expanded="false" aria-controls="exampleAccordionCollapseTwo">
                            Lorem ipsum dolor sit
                        </button>
                    </h2>
                </div>
                <div id="exampleAccordionCollapseTwo" class="collapse" aria-labelledby="exampleAccordionHeadingTwo" data-parent="#exampleAccordion">
                    <div class="card-body">
                        <p class="mb-0">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem alias adipisci fugiat tempora enim libero. Dicta, eveniet repellat iusto quae sequi accusamus repellendus id ducimus enim quam iste ullam totam aspernatur eum saepe odit. Dolore culpa impedit cumque quaerat obcaecati commodi necessitatibus minus, sit suscipit dolorum corrupti atque eum expedita tenetur et sint voluptas beatae temporibus optio reiciendis asperiores libero veritatis exercitationem. Repudiandae itaque ullam hic, commodi sapiente in voluptate, maiores corrupti ipsa expedita delectus provident, aliquam eos deleniti! Minima neque vitae laudantium assumenda culpa error temporibus voluptatem enim a? Quae placeat omnis ratione culpa accusantium, incidunt eum aspernatur voluptates!</p>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header bg-light" id="exampleAccordionHeadingThree">
                    <h2 class="mb-0">
                        <button class="btn btn-link btn-block text-capitalize collapsed" type="button" data-toggle="collapse" data-target="#exampleAccordionCollapseThree" aria-expanded="false" aria-controls="exampleAccordionCollapseThree">
                            Lorem ipsum dolor sit
                        </button>
                    </h2>
                </div>
                <div id="exampleAccordionCollapseThree" class="collapse" aria-labelledby="exampleAccordionHeadingThree" data-parent="#exampleAccordion">
                    <div class="card-body">
                        <p class="mb-0">Lorem ipsum dolor sit amet consectetur adipisicing elit. Ullam, ipsum voluptas nobis, soluta molestias repellat aut reiciendis id quae dolorum recusandae temporibus facilis voluptatem. Voluptates neque veniam consectetur itaque reiciendis fugiat sint dolorem perspiciatis, ex soluta culpa unde eum officia libero impedit quae nesciunt. Enim maiores temporibus ab commodi esse similique optio fuga error nulla dolore quaerat saepe libero ipsam neque doloribus aliquid iusto facere, doloremque sunt! Atque quasi dolorum consequatur. Maiores ipsum doloribus est! Quod, facilis. Voluptates dolores eaque excepturi labore assumenda sapiente, adipisci mollitia, autem et laboriosam ea, aspernatur aliquid quo officiis. Architecto ut minus magni animi consectetur.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fd8d928d8d988fd3978ebdccd3cccbd3cd">[email protected]</a>/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>   
</body>
</html>

My theory is that this issue may have been triggered by a recent Chrome update, as accordions I created earlier this year and even last year functioned perfectly (scrolled correctly).

Any assistance or suggestions would be greatly appreciated! :)

Here's a Gyazo gif to demonstrate the issue:

Answer №1

The issue mentioned previously was identified in a recent Chrome update and was officially reported here.

On August 4th, 2020, Bootstrap launched v4.5.1 which successfully resolved the scrolling problem.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Transmitting live video to rtmp using the client's web browser

Is it feasible to stream video from a client browser to an RTMP server without using Flash? I am searching for an alternative solution. https://github.com/ahyswang/actionscript-publisher I found this to be effective, but it relies on Flash. Do I need to ...

werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The server is unable to process the request sent by the browser or proxy. This error occurred in a Flask web application

Can someone guide me on troubleshooting this issue in Flask? I am still learning. Server running at (Press CTRL+C to exit) 127.0.0.1 - - [26/Jul/2020 11:19:45] "GET /predict HTTP/1.1" 500 - Traceback (most recent call last): raise exceptions. ...

Creating an Angular loading component using the route parameter

When a user clicks on a link in the home component, I want to load a different component based on the URL parameter. For example, if the user is at "/home" and sees a list of links: Link 1 Link 2 Clicking on Link 1 should load the details component with ...

Update image source dynamically using AJAX and jQuery

Within my app, there exists a web page that contains numerous images with dynamically generated source URLs obtained by sending get requests to the rails server. Initially, these images are assigned a default source. Upon loading the page, another request ...

Winning opportunities created by using credits in the slot machine

**Greetings, I have created a slot machine using JavaScript, but I am looking to enhance the player's chances based on their credits. Can anyone guide me on how to achieve this? Essentially, I want the player's odds to increase proportionally wit ...

What is the most effective method for grouping state updates from asynchronous calls in React for efficiency?

After reading this informative post, I learned that React does not automatically batch state updates when dealing with non-react events like setTimeout and Promise calls. Unlike react-based events such as onClick events, which are batched by react to reduc ...

What is the best way to create a scrollable nested div?

Link to Image My goal is to keep the red section fixed while allowing only the blue section to scroll when there is overflow. The red section consists of two divs. I have attempted using position: fixed to achieve this, but encountered issues such as ove ...

Utilize jQuery to interact with a pair of dropdown menu options

In my web application, I have two identical dropdown lists that contain the same values. These dropdown lists are used for account numbers. I want to prevent users from selecting the same item from both lists. For example, if a user selects item #1 fro ...

Updating state of an array nested inside an object using React and ES6

I'm fairly new to Javascript and I feel like my lack of fundamental knowledge might be hindering me from solving this issue. Despite trying different approaches and reading tutorials, I can't seem to get it right. My goal is to manipulate the st ...

The Jquery .change() function refreshes the results just once

I am working on a form with 3 input fields named #first, #second, and #third, along with a fourth field labeled as #theResult. <div id="addFields"> <span id="addFieldsHeader">Add The Fields</span> <table style="margin:0 auto;"> ...

Having trouble creating a text channel in discord.js

Today I successfully programmed a bot to respond to the "!new" command, but encountered an unexpected issue. The current functionality of the bot creates a channel named "support-1" when prompted with the "!new" command. However, every subsequent use of th ...

Commencing CSS Animation Post Full Page Loading

I am looking for a solution using WordPress. In my specific case, I want the CSS Animations to take effect only after the page has completely loaded. For example: click here This is my HTML: <div class="svg-one"> <svg xmlns="ht ...

In Javascript, the color can be changed by clicking on an object, and the color

Looking for help with my current HTML code: <li><a href="index.php" id="1" onclick="document.getElementById('1').style.background = '#8B4513';">Weblog</a></li> The color changes while clicking, but when the lin ...

Transforming the mui stepper connection into a progress bar is simple. Each step contains individualized content to guide you through the process

Is there a way to make the MUI stepper connector act as a progress indicator? I have step content and connectors as separate divs, but I'm having trouble styling them. Any assistance would be greatly appreciated! ...

Persist user input even after reloading the page

In order to enhance the user experience, I would like to implement a feature where the data entered by the user is preserved even if they refresh, reload, or close the page. This includes retaining the selections made in the select elements. Additionally, ...

Retrieving information from Firebase after updating it

My goal is to automatically navigate to a specific ID after adding an item to my realtime database. Despite following the documentation's proposed solution, I am encountering issues with its implementation. Following the use of the push().set() meth ...

Using v-for with nested objects

Have you been attempting to create a v-for loop on the child elements of the {song: "xxx"} object within the songs array? export const data = [ {id: "1", albumname: "xx", artist: "xxxx", dateadded: "xxxx", route: "xxxx", songs: [{ song : &apos ...

all-encompassing ajax call method with jquery

Is there a universal function for calling ajax requests globally? For example, instead of writing the same code multiple times: $.ajax({ url: some_url_address, type: 'post', data: $('#form').serialize(), dataType: &apos ...

How to deliver various static files in NestJS using different paths and prefixes?

I've set up static file serving for developer documentation using the following code: app.useStaticAssets(docsLocation, { prefix: "/docs/" }) Now I have another directory with more static content that I want to serve. Is it possible to serve from ...

Why Are My JavaScript GET Request Parameters Displaying as Strings Rather Than Numbers?

Currently, I am in the process of developing a REST API where one of the defined routes looks like this: router.get("/objects/:id?/:val1?/:val2?", getObject); Specifically, my request from Postman appears as follows: http://localhost:8000/objects?val1= ...