question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for portals?

See original GitHub issue

In the process of reimplementing my react-popper-based Tooltip component with react-laag, I ran into an issue. I’ve used Popper’s createPortal support to position my tooltips at a specific place in the DOM. Something like this:

<Tooltip
  tooltip="Project status"
  container={document.querySelector( '.grid .projects .tooltips' )}
>
  <Project />
</Tooltip>

There’s a couple reasons I do this:

  1. I can easily control the tooltips z-index by setting it on the .tooltips element;
  2. The width and style (font size, weight etc) of the tooltips is not influenced by its target;
  3. But more importantly, I can make sure the tooltips scroll with the content (without JS repositioning jank). I simply put the .tooltips container in the same scroll parent as the content and it automatically works.

When I attempt to use a portal in renderLayer, the positioning is off. Any advice or is this simply not supported?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
rijkcommented, Oct 27, 2019

Awesome. The package is getting better and better!

1reaction
everweijcommented, Oct 23, 2019

No problem, I’m glad it worked out ok!

I did some quick tests, and I think I can dump the wrapper-divs entirely. That way, the layers will only be in the dom when necessary

Read more comments on GitHub >

github_iconTop Results From Across the Web

Portals | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web ... Portals enable seamless navigation between sites or pages.
Read more >
What is a Support Portal | Helpshift
A customer support portal, or web support portal, is a self-serve, web-based customer service tool customers can use to get help quickly.
Read more >
15 Best Client Portal & Customer Portal Software for 2023
Choose the best client portal software and give your customers a single place to log in, check open tickets, and access account information....
Read more >
Meta Portal Help Center
Tell us what you need support with and we'll find the best solution for you. Contact support. Feedback. KEEP YOUR EXPERIENCE UP TO...
Read more >
What is a Customer Portal and Why Is It Important? - SupportBee
A customer portal helps your customers submit and track service requests. In this post we show you how to implement one for your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found