You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system and version: Windows 10
Browser and version: Firefox 86.0 and Chome 89.0.4389.82
I'm trying out the new offcanvas component, which is great, but when I have show as part of the initial classes, the menu doesn't open on page load. It may be something I'm doing wrong, but I think I've followed the setup correctly for the current Bootstrap from GitHub.
<!doctype html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport" content="width=device-width, initial-scale=1"><linkrel="stylesheet" href="css/bootstrap.css"><title>Offcanvas test</title></head><body><divid="app-menu" class="offcanvas offcanvas-start show"><h2>Offcanvas</h2></div><buttonclass="btn" type="button" data-bs-toggle="offcanvas" data-bs-target="#app-menu">
Open menu
</button><scriptsrc="js/bootstrap.bundle.js"></script></body></html>
Expected behaviour: On load, the offcanvas is opened, and the document obscured by the overlay.
Actual behaviour: No offcanvas shown. Clicking the button the first time does nothing (it toggles the show class off), then the second time it shows the offcanvas and the document is obscured.
Moving the script tag to the top of the document or into the head seems to make no difference.
The text was updated successfully, but these errors were encountered:
https://codepen.io/iainhallam/pen/XWNQZRV replicates for me. The CSS (bootstrap.css) and JS (bootstrap.bundle.js) in that are taken from the dist/ directory of a Git checkout of main at commit e153e5f5b2b82ad09a9874b8ff1dfca986790f76 after running npm run dist. The show class is present in the HTML, but the offcanvas isn't shown until the button has been clicked twice to remove the class then re-add it again.
Operating system and version: Windows 10
Browser and version: Firefox 86.0 and Chome 89.0.4389.82
I'm trying out the new offcanvas component, which is great, but when I have
show
as part of the initial classes, the menu doesn't open on page load. It may be something I'm doing wrong, but I think I've followed the setup correctly for the current Bootstrap from GitHub.Expected behaviour: On load, the offcanvas is opened, and the document obscured by the overlay.
Actual behaviour: No offcanvas shown. Clicking the button the first time does nothing (it toggles the
show
class off), then the second time it shows the offcanvas and the document is obscured.Moving the script tag to the top of the document or into the
head
seems to make no difference.The text was updated successfully, but these errors were encountered: