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
popover: extends screen width in ltr & rtl #3031
Comments
Hey, @Ardeshir81 ! Ok, I think we need an explanation here. In ng-bootstrap when you specify If you need popover to be positioned automatically, you should use just
P.S. I reopened the #2924 as a feature request, because it's a different kind of problem |
This is great to know. I wasn't aware of the use of
However I didn't infer that viewport checking was at work. Perhaps the doc could be a bit more explicit? Or is it noted elsewhere, and I (and possibly others) missed it? Regardless, this is a win for the OP's Thank you! |
Thanks @maxokorokov . yep! That does the work and does it actually very well. NICE! I agree with @mendeza. And nice job with the issues :) BTW, I was struggling with the code. we are building a custom ng-bootstrap for our website, and I was assigned to a very specific use-case: ngbPopover on let, in RTL, in small screens (generally responsive mode) and I ended up with something like this: As you see, The default is good, a little smaller screen is not bad, but the last scenario (smallest screen) is awful. It needs more processing and I'm not sure if it is the right solution. I was trying to do ugly things like this:
BTW, I concluded that everything is fine and working and I was doing something that is already done in another way. I will talk to project manager and If he still insists on completing this, maybe I could come up with a nice standard solution and a nice PR. Thanks! I'm satisfied with the issue :) |
Bug description:
Popover on left & Popover on right extends body, hence adding more width and make page scroll-able.
It is visible on
ng-bootstrap
's demo Stackblitz of Popover (on right) and this one that I prepared:https://stackblitz.com/edit/angular-gtkkbw
Here, if you click
Popover on left
it extends the body (note that direction is rtl)And this is the demo provided on Popover by
ng-bootstrap
: https://stackblitz.com/angular/lvnmleonenmLink to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-gtkkbw (click on popover left)
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 7.0.0
ng-bootstrap: 4.0.3
Bootstrap:
P.S.
I was searching for issues and I saw this one:
#2924
is it solved? why is it closed? I didn't see correct result in demos
The text was updated successfully, but these errors were encountered: