Skip to content

position service does not include margin left of body when calculating tooltip offset #291

Description

@joshunger

When you have a tooltip that is appended to the body (tooltip-append-to-body="1") the position service does not include the margin left of the body causing the offset and left to be incorrect.

Something like this fixes the issue for me -

offset.left = Math.round(offset.left - parseFloat(window.getComputedStyle(document.body).marginLeft));

Top might also need to be fixed.

The position service appears to be significantly out of date compared to the Angular UI Bootstrap position service. There might be other bug fixes already fixed in Angular UI Bootstrap that would be worth grabbing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions