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
  • #13897
Closed
Open
Issue created Jun 23, 2014 by Administrator@rootContributor

Tooltips auto placement calculates available space wrongly.

Created by: qris

If the tooltip is positioned "auto right", then it assumes that its own left + width must be less than the parent width, otherwise it switches to the alternate position:

placement == 'right'  && pos.right + actualWidth      > parentDim.width ? 'left'

However that's not actually true because it ignores the position of the parent (specifically its left offset). Thus it's easy for the tooltip to think there's not enough space when there is.

For example, if you look at the attached screenshot you can see that:

pos.right: 807.75
actualWidth: 191
parentDim.width: 483
parentDim.left: 694.75
parentDim.right: 1177.75

The tooltip should be to the right of the "Add/Remove" button, and clearly there is space: pos.right + actualWidth = 999, while parentDim.right = 1177. However the calculation uses parentDim.width instead of parentDim.right, ignoring the left offset of the parent, so it thinks there isn't enough space.

screenshot from 2014-06-23 12 34 54

Assignee
Assign to
Time tracking