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
  • #31658
Closed
Open
Issue created Sep 15, 2020 by Administrator@rootContributor

Error 'this.tip.parentNode is null' when disposing of Tooltip.

Created by: nikonthethird

Bootstrap V5 Alpha 1.

I get an error at this source code line:

System.Exception: Microsoft.JSInterop.JSException: this.tip.parentNode is null
dispose@https://localhost:5001/vendor/js/bootstrap.bundle.js:6130:9
window.blazor_disableTooltip@https://localhost:5001/app.js:17:52
beginInvokeJSFromDotNet/i<@https://localhost:5001/_framework/blazor.webassembly.js:1:3942

Context: I am developing a Blazor application that uses Bootstrap 5. When a Blazor component is destroyed, I clean up all the Bootstrap elements I have created, including tooltips. The error above does not appear all the time, but I can get it somewhat consistently when stopping the application.

I made the error disappear (I don't know if it's actually the right way to do this), by also checking if parentNode is not null right here:

if (this.tip && this.tip.parentNode) {
  this.tip.parentNode.removeChild(this.tip);
}

Operating System: Ubuntu 20.04 & Windows 10 2004 Browser: Chromium (latest) and Firefox (latest)

Assignee
Assign to
Time tracking