-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(datetime): improve datetime sizing in modals #24762
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find 👀 Incidentally, this also seems to fix #23985; it even looks good on Firefox.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on iOS 14 + 15 and works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had a thought... can we add a test to verify this fixed behavior too? #24762 (review)
I was unable to replicate that issue in Chrome (the original reported issue) or in Firefox (the follow-up comment). I believe the original issue was a Chrome specific version that has since been fixed. I can add a smoke test though, just to make sure it works with a zoom in/out active. |
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
When an
ion-datetime
has a sub-pixel width (either explicitly or through an auto-sizing layout), the intersection observer is unable to detect the intersecting threshold of 100% (1
).This results in the month navigation breaking, months updating sporadically on click and overall broken functionality.
Issue Number: #23992
What is the new behavior?
By applying a root margin to the intersection observer of
1px
, it accounts for the difference of the sub-pixel sizing and appropriately fires the intersection observer when the month is intersecting.This fixes all the broken behavior with the calendar month not appropriately updating.
Does this introduce a breaking change?
Other information