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
  • #16219
Closed
Open
Issue created Apr 03, 2015 by Administrator@rootContributor

bug when tooltip template has text (e.g. new line character) in between <div>s

Created by: stelovsky

When there is text in tooltip 'template' option (e.g. new line character), a bug is reported in jQuery. Tracing the bug leads to Tooltip.prototype.applyPlacement where on line 1500 $tip.offset(offset) is called and $tip contains 'text' nodes (which don't have offset, or at least ownerDocument.defaultView.getComputedStyle( elem, null ) doesn't want 'elem' to be 'text' when 'ownerDocument' is #document):

image

$tip: jQuery.fn.init[7] 0: div#tooltip981716.tooltip.fade.bottom.in 1: text 2: div#tooltip981716.tooltip-arrow.fade.bottom.in 3: text 4: div#tooltip981716.tooltip-inner.fade.bottom.in 5: text 6: div#tooltip981716.fade.bottom.in length: 7 ....

This is the error message:

image

And this is the state: image

The best would be to skip the text elements or at least the documentation of Tooltip should state that not even eonls are allowed in between the <div>s

Assignee
Assign to
Time tracking