-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
p-dropdown causes page to horizontally scroll #10992
Comments
Hi. Sorry, but it doesn't really fixed the issue. If you put the dropdown to the right half of the page. In your example: |
if you get this issue, use appendTo='body' to work around the bug. |
I'm using version 13.2.0 and appendTo="body" doesn't help to overcome the issue. The page is scrolled to the left when dropdown is opened |
Same here. I am using 13.4.1 and am still getting the horizontal scrolling behavior bug. My dropdown is in the right half of the screen. It seems to not jump when I place the dropdown in the left half. |
For 13.4.1 p-dropdown appendTo="body" fixed my problem. Thanks |
Put appendTo="self" in the dropdown and override the CSS of p-dropdown-panel, position: absolute; (will be by default) |
Any update on this issue? Nothing I do with appendTo works for this issue when there is a scroll. |
I was able to overcome this issue by setting
I'm using [email protected] Edit: If you're using |
|
Hi , did you find the solution for this issue? Please help |
look here #11046 |
For me, the only fix here that "worked" was In my case, this issue was caused by a Bootstrap interaction, somehow. I'm still now sure how opening the dropdown triggered it though. I had the <div class="row g-0">
. . .
</div> |
I've found out that when you open and close the dropdown, a new div is added after the p-overlay element which position is out of the dropdown's parent client area. So if the parent can overflow, the scrollbars appear. With css I've hidden this new element, which looks like this btw: |
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://primeng-dropdown-demo-vx9kqt.stackblitz.io
Current behavior
In a page that has a horizontal scroll bar and an option has previously been selected, when a dropdown is clicked the page will automatically scroll. This is new and undesirable behavior
The bug was induced in primeng v12.2.2. The bug is in primeng v13.x
Issue: #10976 was closed because it was not clearly described. Hopefully this new issue provides clarity. I'm assuming the proposed solution in issue #10976 will fix this issue. From MrPollux issue report:
Expected behavior
No scrolling.
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/primeng-dropdown-demo-vx9kqt?file=src%2Fapp%2Fapp.component.html
A simple modification to the primeng "single" dropdown demo. I just added a div to insure that a horizontal scroll bar would be present.
Angular version: 13.X
PrimeNG version: 13.X
Browser: all
Language: all
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: