GithubHelp home page GithubHelp logo

Comments (4)

quaardvark avatar quaardvark commented on May 21, 2024

I think hiding them on scroll can be a bit of an unexpected behavior. A more expected behavior for them would probably be to stay near the target, but in this case the target is also in a portal (in the Dialog), while the portal of the tooltip is absolutely positioned within the body, that doesn't scroll.

What could possible solution look like? Portals within the portals?

from elements.

pkrawc avatar pkrawc commented on May 21, 2024

This is related to #95 as well. It's really a problem of the popover component I thinking.

from elements.

pkrawc avatar pkrawc commented on May 21, 2024

This was my naive approach yesterday to detect the highest scrolling parent..

With portals opening adjacent to each other in the tree we can't really use that.

// Use the portal element to position things and scroll if necessary? Would that work?
<PortalElement>
  <Dialog />
  <Tooltip />
</PortalElement>

from elements.

pkrawc avatar pkrawc commented on May 21, 2024

I'm thinking the above could work, but requires the dialog to change the portal component if its the one opening it (to overflow-y: auto)

from elements.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.