Skip to content

Conversation

@ShaneK
Copy link
Member

@ShaneK ShaneK commented Nov 18, 2025

Issue number: resolves #30706


What is the current behavior?

Due to some recent unknown changes, the intersection observer for date time no longer reliably fires, especially in mobile views.

What is the new behavior?

In this PR, we're adding a visibility check after everything has had a chance to render to make sure we're setting up properly even if the intersection observer has failed to trigger for some reason.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Since the intersection observer is being set up after a raf, it's possible something got introduced to make the initial setup slower for some reason, causing timing issues. I think we should do a more thorough investigation into the cause of this problem when we have more time.

This PR also adds tests to verify the new fallback works properly.

Current dev build:

8.7.10-dev.11763478209.1d9c4cd8

@ShaneK ShaneK requested a review from a team as a code owner November 18, 2025 15:02
@ShaneK ShaneK requested a review from gnbm November 18, 2025 15:02
@vercel
Copy link

vercel bot commented Nov 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Nov 20, 2025 7:45pm

@github-actions github-actions bot added the package: core @ionic/core package label Nov 18, 2025
@ljanner
Copy link

ljanner commented Nov 19, 2025

@ShaneK The dev build does correctly resolve the problem for me 👍 Thanks providing a fix 🙇

Copy link
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brandyscarney brandyscarney changed the title fix(date-time): ensure date time is shown when intersection observer fails to report visibility fix(datetime): ensure date time is shown when intersection observer fails to report visibility Nov 19, 2025
Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small request to link the follow-up investigative ticket & I also left some other feedback on the Jira ticket. Looks good though!

@brandyscarney brandyscarney changed the title fix(datetime): ensure date time is shown when intersection observer fails to report visibility fix(datetime): ensure datetime is shown when intersection observer fails to report visibility Nov 20, 2025
Merged via the queue into main with commit 9d781db Nov 20, 2025
51 checks passed
@ShaneK ShaneK deleted the fix/date-time branch November 20, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: IonDateTime sometimes show invisible calendar

6 participants