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

bug: datetime intersection observers get disconnected when changing presentation programmatically #24826

Closed
4 of 6 tasks
averyjohnston opened this issue Feb 21, 2022 · 4 comments · Fixed by #24828
Closed
4 of 6 tasks
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@averyjohnston
Copy link
Contributor

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

When ion-datetime has its presentation prop changed programmatically, the intersection observers driving month selection seem to be getting disconnected. This causes all sorts of buggy behavior.

Screencast: https://user-images.githubusercontent.com/90629384/138342256-4571c211-d08b-473f-a96a-055e2a4886c8.mp4

Expected Behavior

Month selection should function normally after changing the presentation.

Steps to Reproduce

  1. Visit the existing display test for datetime.
  2. Change the "Presentation" dropdown to something else.
  3. Try to change the month via the arrow buttons.

Code Reproduction URL

http://localhost:3333/src/components/datetime/test/display

Ionic Info

[WARN] You are not in an Ionic project directory. Project context may be missing.

Ionic:

   Ionic CLI : 6.17.1

Utility:

   cordova-res : 0.15.3
   native-run  : 1.4.1

System:

   NodeJS : v16.13.0
   npm    : 8.1.0
   OS     : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 21, 2022
@averyjohnston averyjohnston added package: core @ionic/core package type: bug a confirmed bug report labels Feb 21, 2022
@ionitron-bot ionitron-bot bot removed the triage label Feb 21, 2022
@arnotixe
Copy link

arnotixe commented Mar 2, 2022

Wonder if this is related to my bug? I have ionic 6.0.9 with a datetime modal on A TAB page 'tab2' ("tabs" starter template) and it seems to "disconnect" from the open-modal trigger when i router.navigate() to another tab. Code is copied straight from the example page https://ionicframework.com/docs/api/datetime

  • Switching from tab2 to tab1 back and forth many times does not disconnect the popover trigger.
  • Navigating from tab1 to tab2 with router.navigatebyurl() after having switched tabs from 2 to 1 first disconnects
  • Refreshing tab1 and router.navigatebyurl(tab2) it is not disconnected.
  • Refreshing tab2 after a disconnect "fixes" the disconnect
<ion-button id="open-modal>
<ion-modal trigger="open-modal">
            <ng-template>
              <ion-content> etc```

@averyjohnston
Copy link
Contributor Author

@arnotixe That sounds like something else; could you open a separate issue?

@averyjohnston
Copy link
Contributor Author

Resolved via: #24828

@ionitron-bot
Copy link

ionitron-bot bot commented Apr 10, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants