Skip to content

Tooltip should be rendered in the document body instead of just outside of div #13

Description

@akashishu777

Currently, the tooltip is get rendered in this way

<body>
    <div>
        <span class="dragitem" id="test">hello</span>                         //main element
        <div> class="sc-dnqmqq fOiqOs" offset="8" open>Tooltip</div>         //tooltip 
    </div>
<body/> 

But in this case, if there is some other div are present before after then some portion of the tooltip cuts off.

In order to fix this, I think you need to render you tooltip every time just before the document body gets the end.

<html>
<body>
  <div>
     <span class="dragitem" id="test">hello</span>     //main element
  </div>
</body>

<div> class="tooltip" offset="8" open>Tooltip</div>    //tooltip
</html>

For your reference: http://jamesknelson.com/rendering-react-components-to-the-document-body/

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions