Skip to content
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-checkbox causes layout issues when used inside an overflow: auto div #9725

Closed
KiranChinnam opened this issue Jan 7, 2021 · 6 comments
Closed
Assignees
Labels
LTS-FIXED-10.1.4 Fixed in PrimeNG LTS 10.1.4 LTS-FIXED-11.4.7 Fixed in PrimeNG LTS 11.4.7 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@KiranChinnam
Copy link

If you have a PrimeNG PRO Support subscription please post your issue at;

https://pro.primefaces.org

where our team will respond within 4 business hours.

If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that
your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.

Current Queue Time for Review
Without PRO Support: ~8-12 weeks.
With PRO Support: 1 hour

I'm submitting a ... (check one with "x")

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.

https://stackblitz.com/edit/primeng-checkbox-flex-issue

Current behavior

When the checkbox is used in a div with overflow:auto and requires scrolling in the div to make the checkbox visible, extra space is added at the bottom of the page. When the checkbox is clicked, the page jumps.

Expected behavior
No extra space, and page should not scroll on interaction with the checkbox.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?
Checkbox does not work if using overflow: auto to create scrollable panels.

  • Angular version: 11.x (latest)

  • PrimeNG version: 11.x

  • Browser: Chrome 87, Edge 87

  • Language: TS 4.03
@yigitfindikli yigitfindikli added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add labels Jan 8, 2021
@john8329
Copy link

john8329 commented Apr 8, 2021

YES! I've been looking into this for hours. This still happens with PrimeNG LTS 10.1.0, and it's a blocking issue. I can confirm #9726 fixes the problem.

@KiranChinnam
Copy link
Author

I've worked around this issue by setting the display property in the global styles.scss

.p-hidden-accessible{ display: none; }

@PeterHewat
Copy link

The .p-hidden-accessible{ display: none; } hack introduces another issue:
It prevents a p-dropdown to get the focus.
Here is the p-dropdown example from the documentation to show you:
https://stackblitz.com/edit/primeng-dropdown-demo-p-hidden-accessible-focus-issue?file=src/app/app.component.scss
Only the "Editable" dropdown is focusable because it has an input so that you can edit... that is focus-able.

@KiranChinnam
Copy link
Author

@PeterHewat Thanks for testing this. The other method I used was to set position: initial; instead (see original repro Stackblitz). This doesn't seem to exhibit the same focusing issue. I'll update the PR later.

@PeterHewat
Copy link

@KiranChinnam Thanks, position: initial; does indeed fix the issues I was having.

@PeterHewat
Copy link

position: initial; unfortunately also introduces other layout issues such as in certain circumstances, p-inputSwitch are moved below there expected position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-10.1.4 Fixed in PrimeNG LTS 10.1.4 LTS-FIXED-11.4.7 Fixed in PrimeNG LTS 11.4.7 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

5 participants