twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Home Page:https://getbootstrap.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quick click issue when during offcanvas opening

iviWebStudio opened this issue · comments

Prerequisites

Describe the issue

When trying to open offcanvas and during opening transition clicking outside the offcanvas area, instead of slide and hide offcanvas smoothly, the screen was flushing and offcanvas markup crashing, and finally hiding without transition.

Reduced test cases

  1. Go to the official documentation page
  2. Quick double click to offcanvas demo buttons: "Link with href" or "Button with data-bs-target"
  3. You can see the visual issue

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

Windows, Linux

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

Chrome, Firefox

What version of Bootstrap are you using?

5.3

A potential solution could involve adding a debounce function to the offcanvas close event handler to prevent it from triggering while the open animation is still in progress. Additionally, checking the state of the offcanvas (whether fully opened) before allowing it to close could help manage this issue