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
  • #25519
Closed
Open
Issue created Jan 31, 2018 by Administrator@rootContributor

Tooltip runs update after dispose, triggering null reference error, repeating on scroll events.

Created by: clemdavies

Tooltip is running an update after being disposed of. After error occurs, reliable but not consistent across all tooltips, Tooltip continues to try to update and producing the same error when scrolling up and down page.

Only tested in Aurelia typescript environment. tooltip is a custom attribute basically setup like so:

attach(){
        $(this.element).tooltip(options);
    }
    detached(){
        $(this.element).tooltip("dispose");
    }
"TypeError: Cannot read property 'template' of null\n    at o.m.getTipElement (http://localhost:9000/scripts/vendor-bundle.js:50459:35772)\n    at o.m._cleanTipClass (http://localhost:9000/scripts/vendor-bundle.js:50459:38934)\n    at o.m._handlePopperPlacementChange (http://localhost:9000/scripts/vendor-bundle.js:50459:39075)\n    at Object.onUpdate (http://localhost:9000/scripts/vendor-bundle.js:50459:34291)\n    at Popper.update (http://localhost:9000/scripts/vendor-bundle.js:4678:18)\n    at Popper.update$$1 (http://localhost:9000/scripts/vendor-bundle.js:6159:21)\n    at http://localhost:9000/scripts/vendor-bundle.js:3838:7\n    at <anonymous>\nFrom previous event:\n    at http://localhost:9000/scripts/vendor-bundle.js:3836:30"

It is not happening on all tooltip instances, can have as many as 20 active at a time, but I can reliably replicate the error by navigating my site in a particular way. I have checked to ensure I am not creating the bug in my code. No duplicate references, duplicate instances, timing, etc.

I have traced it to bootstrap's tooltip.js code:

this.tip = this.tip || $(this.config.template)[0]

It looks like there is no check from

    _handlePopperPlacementChange(data)

being called, through to trying to access template property on this.config.

Assignee
Assign to
Time tracking