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: Teleported components are not unmounted in Vue #26644

Closed
4 of 7 tasks
raymer opened this issue Jan 19, 2023 · 4 comments
Closed
4 of 7 tasks

bug: Teleported components are not unmounted in Vue #26644

raymer opened this issue Jan 19, 2023 · 4 comments
Assignees
Labels
package: vue @ionic/vue package type: bug a confirmed bug report

Comments

@raymer
Copy link

raymer commented Jan 19, 2023

Prerequisites

Ionic Framework Version

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

Current Behavior

As of 6.4.2, when modals are opened (at least via modalController) they aren't unmounted on dismiss, causing stale data on creation of the modal again. (All previous refs, etc still have their data from last time the modal was created)

Expected Behavior

On dismiss, modals should unmount, causing all refs and other data to clear.

Steps to Reproduce

  • Install 6.4.2 or newer of ionic.
  • Create a modal via modalController.create
  • Add input field with ref to modal
  • type data in the input
  • dismiss the modal
  • create a modal via modalController.create again
  • see old input values in the input field

Code Reproduction URL

https://github.com/raymer/ionic-modal-bug

Ionic Info

Ionic:

Ionic CLI : 5.4.16 (C:\Users\rayme\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/vue 6.4.2

Capacitor:

Capacitor CLI : 4.6.1
@capacitor/core : 3.9.0

Utility:

cordova-res : not installed
native-run : 1.7.1

System:

NodeJS : v18.12.1 (C:\Program Files\nodejs\node.exe)
npm : 8.19.2
OS : Windows 10

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jan 19, 2023
@sean-perkins sean-perkins self-assigned this Jan 19, 2023
@sean-perkins
Copy link
Contributor

@raymer thanks for reporting this issue! I'm able to reproduce and have narrowed it to the changes I recently made here: #26543.

I'll log this as a bug and dig deeper into why there is an objective difference between the filter and splice usage and how to solve the original bug and restore the regressed behavior.

@sean-perkins sean-perkins changed the title bug: Modals do not unmount on dismiss, causing old data to be in the modal when opening again bug: Teleported components are not unmounted in Vue Jan 19, 2023
@sean-perkins sean-perkins added package: vue @ionic/vue package type: bug a confirmed bug report labels Jan 19, 2023
@ionitron-bot ionitron-bot bot removed the triage label Jan 19, 2023
@sean-perkins
Copy link
Contributor

@raymer can you test with this dev-build and let me know if you run into issues?

npm install @ionic/vue@6.5.1-dev.11674170004.1a4e4ede @ionic/vue-router@6.5.1-dev.11674170004.1a4e4ede

@raymer
Copy link
Author

raymer commented Jan 19, 2023

@sean-perkins that looks like the fix. Didn't notice any other issues 👍

@ionitron-bot
Copy link

ionitron-bot bot commented Feb 19, 2023

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 Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: vue @ionic/vue package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants