Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
akashishu777 opened this issue Nov 9, 2018 · 7 comments

Comments

@akashishu777
Copy link

akashishu777 commented Nov 9, 2018

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/

@cedricdelpoux
Copy link
Owner

What do you mean by "The tooltip cuts off"? Do you a a visual?

@akashishu777
Copy link
Author

akashishu777 commented Nov 9, 2018

Have a look url

@cedricdelpoux
Copy link
Owner

why not specify an overflow: visible on your component ?

@akashishu777
Copy link
Author

akashishu777 commented Nov 13, 2018

Hi @xuopled It doesn't work, and it will not until we render our tooltip outside the parent div and inside the body tag as I have mentioned in my comment #13 (comment)

This is the issue!
screenshot 396

@cedricdelpoux
Copy link
Owner

Ok I understand. The problem is that the tooltip is positioned relatively to the component attached to it. If the tooltip is render before the end of the body, I will not be possible anymore.

I open to a pull request if you success to do what you need without changing the tooltip behavior

@cristian-sima
Copy link

any update?

@cedricdelpoux
Copy link
Owner

If you want to help me with a PR, please do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants