-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Position fixed elements are getting cutoff #662
Comments
Please add a reproduction https://stackblitz.com/edit/ngx-scrollbar |
I checked the css of the scrollbar, this is the line causing the issue. When I remove this, it works fine. |
Yes, absolute and fixed elements won't work properly with |
Omg, really? Then what's the solution? |
You said when you remove it, it works! then what's the issue? |
@MurhafSousli we have the same problem.
and we have "fixed buttons" The problem is, that contain: content has element with .ng-scroll-content class But when i set contain: none |
Hacked with:
in component containng that ng-scrollbar and fixed button. |
@montella1507 I think a better solution without a hack, if you place your button outside the scrollbar component and make it absolute to the bottom <div class="relative-position-container">
<ng-scrollbar class="full-height" hoverOffset orientation="vertical">
<ng-content/>
</ng-scrollbar>
<button class="absolute-bottom">segment</button>
</div> If your button is projected via content, you can use <div class="relative-position-container">
<ng-scrollbar class="full-height" hoverOffset orientation="vertical">
<ng-content/>
</ng-scrollbar>
<div class="absolute-bottom">
<ng-content select="button.action-button"/>
</div>
</div> |
Yeah, however, this is not possible :-/ // page component
// layout
// any page loaded "to the" router outlet
So particular page is loaded "inside of the page" (inside of the scrollbar). BTW why is contain: content so neccessary there? i though it is only usually used as an optimization. |
@montella1507 The plugin uses the sticky position technique to hold the scrollbars position while scrolling the viewport. the advantage of using sticky that you are able to scroll via mouse wheel while pointer is over the scrollbar, that was not possible when you use absolute positioning because the scrollbars would block the wheel event while pointer is over the scrollbar. Maybe this is a absurd detail and maybe most users don't care about it. but I wanted to mimic the original scrollbar functionality. So this was a solution an overwhelming options we provided in older versions called
I am looking forward to find a better way, hopefully when I find sometime soon. |
Reproduction
I have a dialog window with position fixed. Its working fine if I move the dialog window out of the scrollbar.
Expected Behavior
The dialog window should not get cut off.
Actual Behavior
The window is getting cut off.
Environment
The text was updated successfully, but these errors were encountered: