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

Calendar: Calendar CSS breaks other Components #14606

Closed
denny99 opened this issue Jan 23, 2024 · 7 comments · Fixed by #14607
Closed

Calendar: Calendar CSS breaks other Components #14606

denny99 opened this issue Jan 23, 2024 · 7 comments · Fixed by #14607
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@denny99
Copy link
Contributor

denny99 commented Jan 23, 2024

Describe the bug

image

The Calendar CSS breaks all other Components that use icon wrapper and click Events. Like the p-chips Component

Environment

Does not matter

Reproducer

https://stackblitz.com/edit/github-sstt7q?file=src%2Fapp%2Fapp.component.html

Angular version

17.1.0

PrimeNG version

17.3.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20

Browser(s)

No response

Steps to reproduce the behavior

Just enter something into the chips element.

Try to remove the chip with the times icon.

Not working due to the calendar css

Expected behavior

No response

@denny99 denny99 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 23, 2024
denny99 pushed a commit to denny99/primeng that referenced this issue Jan 23, 2024
denny99 pushed a commit to denny99/primeng that referenced this issue Jan 23, 2024
@Basketblo
Copy link

+1. In case of p-calendar presented on a screen - all .p-icon-wrapper icons are ignored, for example Clear icon in p-multiselect.

@k0sr
Copy link

k0sr commented Jan 24, 2024

Indeed, upgrading from 17.3.2 to 17.3.3 introduced, in our case, a bug for this case:
<p-calendar [iconDisplay]="'input'" [showOnFocus]="false" [showIcon]="true"></p-calendar>

With these 3 attributes combined, and .p-icon-wrapper having a pointer-events: none;, the calendar component becomes completely useless, since the calendar is never shown (the focus opening being disabled), you can only manually write the date as a text.

@denny99 Are you sure that even with your fix, the calendar icon, when inside the input component ([iconDisplay]="'input'"), can be opened by clicking on the icon while the component focus opening is disabled?

@denny99
Copy link
Contributor Author

denny99 commented Jan 24, 2024

When clicking the icon inside the input. The click will pass through the icon itself. So you actually click the input and this opens the input on focus.

So yeah. When you disable the open on focus this won't work at all.

I guess the design team has to find another solution for this one. The original bug report that caused all this trouble was this one here #14501

@k0sr
Copy link

k0sr commented Jan 24, 2024

I guess the design team has to find another solution for this one. The original bug report that caused all this trouble was this one here #14501

Yes, but shouldn't it be simply reverted, until, as you're saying, the design team finds another solution?
If your PR is merged, the calendar will have a new component functioning issue, whereas if #14501 is simply reverted it will go back to only be a "bad cursor on hover" issue (remaining to be fixed).

@denny99
Copy link
Contributor Author

denny99 commented Jan 25, 2024

I'll change the pr later

@denny99
Copy link
Contributor Author

denny99 commented Jan 25, 2024

@k0sr Thanks for pointing out the potential bug with showOnFocus.

The new fix should, at least partially, solve both issues.

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 27, 2024
@cetincakiroglu cetincakiroglu added this to the 17.5.0 milestone Jan 27, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

Thanks a lot for reporting the issue and the PR!

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

Successfully merging a pull request may close this issue.

4 participants