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
  • #13696
Closed
Open
Issue created May 28, 2014 by Administrator@rootContributor

Tooltip arrow not positioned correctly when offset is adjusted and placement is top or bottom

Created by: timvasil

When a tooltip/popover would appear slightly offscreen to the right or left, it's correctly shifted slightly however the arrow ends up appearing in the middle of the popover, rather than at the edge of it like it should.

In this case, getViewportAdjustedDelta always returns {top: 0, left: 0} because getCalculatedOffset already made the correction to fit the tip on the page, however there are subsequent "delta.left" tests in applyPlacement to deduce left/right vs top/bottom positioning that will break in top/bottom mode.

A fix would be to change the "delta.left" tests with a horizShift test, where horizShift is defined as:

var horizShift = !/right|left/.test(placement);

e.g.

var arrowPosition       = horizShift ? 'left'        : 'top'
Assignee
Assign to
Time tracking