Skip to content

tooltip cutting off when renders near edge of screen #599

@ronmara

Description

@ronmara

Summary:
If I choose place="top" but the content is too wide to fully display in the window, the left side will be rendered off-screen and there is no way for me to see the entire content of the tooltip. (the left position is negative)

Things I tried:
I added:

afterShow={() => {
    let node = ReactDOM.findDOMNode(this.refs.tooltipComponent);
    node.style.left =
        node.style.left[0] === "-" ? "0px" : node.style.left;
}}

but because I have many elements with a tooltip, moving my mouse from one element to another doesn't trigger afterShow.

I added max-width: 70% and it doesn't help either.

Expected behavior:
If (left_position === negative) { place="left/right"; }

Same problem as described here

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