twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
https://getbootstrap.com
MIT License
170.87k stars 78.88k forks source link

OffCanvas menu with anchors: Chrome stopps scrolling #36681

Open rtoenjes opened 2 years ago

rtoenjes commented 2 years ago

Prerequisites

Describe the issue

Given is a long onepager with multiple anchors for onpage navigation via bootstrap offcanvas menu.

When opening the menu and clicking a link with Chrome/Edge Mac the page stopps scrolling before the anchor position is reached. It seems that the scrolling is stopped when the menu is fully closed. Firefox and Safari Mac work well.

Tested with TWBS 5.1 and 5.2beta, Chrome/Edge 103.0.x MacOS.

My only solution for now is setting a timeout when clicking a link, in order to delay the closing of the offcanvas.

Reduced test cases

Example Codepen https://codepen.io/rtoenjes/pen/XWEXNXO

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

macOS

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

Chrome, Microsoft Edge

What version of Bootstrap are you using?

5.1.3, 5.2.0

Axos11 commented 2 years ago

I had encountered the same issue on chrome for mobile and desktop. In my Case i "solved" it by making the closing transition of the offcanvas longer. On desktop .5s and on mobile .7s seem to solve the scroll stop. It's not the best solution but the only one I could find

HALESHAME-78 commented 2 years ago

Unsubscribe

On Wed, 6 Jul, 2022, 6:08 pm Ralf Tönjes, @.***> wrote:

Prerequisites

Describe the issue

Given is a long onepager with multiple anchors for onpage navigation via bootstrap offcanvas menu.

When opening the menu and clicking a link with Chrome/Edge Mac the page stopps scrolling before the anchor position is reached. It seems that the scrolling is stopped when the menu is fully closed. Firefox and Safari Mac work well.

Tested with TWBS 5.1 and 5.2beta, Chrome/Edge 103.0.x MacOS.

My only solution for now is setting a timeout when clicking a link, in order to delay the closing of the offcanvas. Reduced test cases

Example Codepen https://codepen.io/rtoenjes/pen/XWEXNXO What operating system(s) are you seeing the problem on?

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

Chrome, Microsoft Edge What version of Bootstrap are you using?

5.1.3, 5.2.0

— Reply to this email directly, view it on GitHub https://github.com/twbs/bootstrap/issues/36681, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKMTBWM4SQAWZAPRKCHSSBLVSV43VANCNFSM52ZTP2UA . You are receiving this because you are subscribed to this thread.Message ID: @.***>