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
  • #27577
Closed
Open
Issue created Nov 01, 2018 by Administrator@rootContributor

Disposing of detached tooltips inside of a modal causes errors when you close a modal

Created by: ambischof

Found an Interesting bug:

Operating system: MacOS Browser: Chrome 70.0.3538.77

JSFiddle: https://jsfiddle.net/anneb574/aq9Laaew/261755/ (or jsbin but it doesn't show what the error was)

If inside a modal, you create initialize a tooltipped element and then you detach that element and dispose of the tooltip, when you close the modal, it will cause an error:

tooltip.js:416 Uncaught TypeError: Cannot read property 'template' of null
    at Tooltip.getTipElement (tooltip.js:416)
    at Tooltip.hide (tooltip.js:349)
    at HTMLDivElement.<anonymous> (tooltip.js:493)
    at HTMLDivElement.dispatch (jquery-3.3.1.min.js:2)
    at HTMLDivElement.y.handle (jquery-3.3.1.min.js:2)
    at Object.trigger (jquery-3.3.1.min.js:2)
    at HTMLDivElement.<anonymous> (jquery-3.3.1.min.js:2)
    at Function.each (jquery-3.3.1.min.js:2)
    at w.fn.init.each (jquery-3.3.1.min.js:2)
    at w.fn.init.trigger (jquery-3.3.1.min.js:2)

I acknowledge that this is not the typical workflow (that is to detach the element before disposing of the tooltip) but when you're working with view frameworks, it sometimes happens.

Assignee
Assign to
Time tracking