bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Radio Toggle Buttons in Accordion break scrolling

Open shirkrm opened this issue 2 years ago • 3 comments

Prerequisites

Describe the issue

An accordion with limited height and overflow-y-auto, and a body that extends beyond the window height and includes radio toggle buttons will show scrollbars on both the limited height div and the main window.

Expected: The scrollbar is shown only on the limited height div and not on the main body.

image

image

Reduced test cases

https://codepen.io/shirkrm/pen/YzgKeEy

accordion-radio-test.html.txt

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.3.2

shirkrm avatar Dec 19 '23 20:12 shirkrm

Hello @shirkrm. Bug reports must include a live demo of the issue. Per our contributing guidelines, please create a reduced test case on CodePen or StackBlitz and report back with your link, Bootstrap version, and specific browser and Operating System details.

github-actions[bot] avatar Dec 20 '23 05:12 github-actions[bot]

https://codepen.io/shirkrm/pen/YzgKeEy

- -
Bootstrap Version 5.3.2
Browser Chrome
OS Windows

shirkrm avatar Dec 20 '23 12:12 shirkrm

Your radio inputs appear to move lower when the first accordion is open causing the main body of the page to show a scrollbar when showing the elements of both accordions.

Setting the desired position of those elements should solve the issue. You can test this by applying the following style to both input tags:

position: absolute;
left: 0;
top: 0;

Hope this is helpful for your case.

TommasoAllegretti avatar Dec 24 '23 19:12 TommasoAllegretti