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.

Override popover's inline transform: translate() function's x-value

See original GitHub issue

I have an issue in positioning of popover. When I click on trigger button, it sets the transform: translate(x, y) using inline CSS. As displayed in the GIF below, y-value is set as required. But, for x-value, it is unnecessarily going inside the left panel. I want to override x-value with 0 and also want to set the popover arrow relevant to the trigger button and not at center.

Angular: 8.2.14

Bootstrap: 4.3.1

ng-bootstrap: 5.3.0

popover-positioning-issue

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
benouatcommented, May 28, 2020

But it has lagging transform animation which first time aligns it at the top

First time I see this kind of bug. We need to figure out what’s going on here.

I am also facing issues in nested popover

I know it’s not always doable, but I would strongly suggest not to use this pattern! It’s bad in terms of UX and can lead to a lot of nasty side-effects as you can notice.

Did you also try `[container]=“‘body’” as I suggested ? For the nested situation, I think you would be forced to use it.

1reaction
benouatcommented, May 26, 2020

Hey @Gourav102

Can you tell me which placement are you using ? Playing with it might solve your issue. You can also have a look at container and specify [container]="'body'", hence the popover will be displayed on top of your panels.

Read more comments on GitHub >

github_iconTop Results From Across the Web

translate() - CSS: Cascading Style Sheets - MDN Web Docs
The translate() CSS function repositions an element in the horizontal and/or vertical directions. Its result is a data type.
Read more >
tailwindcss-stimulus-components - npm package - Snyk
data-popover-translate-x="0" defines the css transform-translate X value used in positioning the popover.It can be anything from a percentage to rem units ...
Read more >
translate - CSS-Tricks
The translate property works exactly the same as the translate() function that's used with the transform property,
Read more >
tailwindcss-stimulus-components - npm
data-popover-translate-y="-128%" defines the css transform-translate Y value used in positioning the popover. It can be anything from a ...
Read more >
Tailwindcss-stimulus-components - npm.io
<div class="inline-block text-sm px-4 py-2 leading-none rounded ... data-popover-translate-x="0" defines the css transform-translate X value used in ...
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