Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #33792
Closed
Open
Issue created Apr 30, 2021 by Administrator@rootContributor

Javascript error thrown in the browser console when using the Offcanvas navbar example

Created by: gomesp

Hi team

I am looking at the examples available on the website and when I use the offcanvas navbar example I keep getting errors thrown in the browser console (using Firefox and Chrome on macOS - all latest versions).

To reproduce it I:

  1. Opened the example from the bootstrap website
  2. Resized my browser to the small breakpoint to change the navbar
  3. Clicked on the burger menu to expand the navbar.

In Firefox I get the following error:

offcanvas.js:207:11
Uncaught TypeError: this._element is undefined
    _addEventListeners offcanvas.js:207
    i event-handler.js:101
    C event-handler.js:196
    on event-handler.js:224
    _addEventListeners offcanvas.js:205
    Oe offcanvas.js:78
    <anonymous> offcanvas.js:262
    s event-handler.js:119
    C event-handler.js:196
    on event-handler.js:224
    <anonymous> offcanvas.js:238
    <anonymous> bootstrap.bundle.min.js:6
    <anonymous> bootstrap.bundle.min.js:6
offcanvas.js:207:11
    _addEventListeners offcanvas.js:207
    i event-handler.js:101
    (Async: EventListener.handleEvent)
    C event-handler.js:196
    on event-handler.js:224
    _addEventListeners offcanvas.js:205
    Oe offcanvas.js:78
    <anonymous> offcanvas.js:262
    s event-handler.js:119
    (Async: EventListener.handleEvent)
    C event-handler.js:196
    on event-handler.js:224
    <anonymous> offcanvas.js:238
    <anonymous> bootstrap.bundle.min.js:6
    <anonymous> bootstrap.bundle.min.js:6

And in Chrome I get a slightly different error:

Uncaught TypeError: Cannot read property 'defaultPrevented' of null
    at Oe.show (offcanvas.js:102)
    at Oe.toggle (offcanvas.js:94)
    at HTMLButtonElement.<anonymous> (offcanvas.js:264)
    at HTMLDocument.s (event-handler.js:119)
show @ offcanvas.js:102
toggle @ offcanvas.js:94
(anonymous) @ offcanvas.js:264
s @ event-handler.js:119
Assignee
Assign to
Time tracking