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: classList of undefined, navigating between tabs and no tabs #24654

Closed
4 of 6 tasks
jake-newsom opened this issue Jan 25, 2022 · 6 comments · Fixed by #24665
Closed
4 of 6 tasks

bug: classList of undefined, navigating between tabs and no tabs #24654

jake-newsom opened this issue Jan 25, 2022 · 6 comments · Fixed by #24665
Labels
package: vue @ionic/vue package type: bug a confirmed bug report

Comments

@jake-newsom
Copy link

Prerequisites

Ionic Framework Version

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

Current Behavior

After navigating between multiple pages within a tabbed view, then navigating to a non-tabbed view, and then navigating back into the tabbed view, the app throws a javascript error "Cannot read property 'classList' of undefined" (which breaks further page processing in our main app)

Expected Behavior

There should be no javascript error when navigating from the non-tabbed view back to the tabbed view

Steps to Reproduce

  • Start the app from scratch
  • Click "View Blog"
  • Go back
  • Click "View Script"
  • Click "Open New Feature"
  • Go back (should result in error)

Code Reproduction URL

https://github.com/jake-newsom/ionic-tab-example

Ionic Info

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'

   Require stack:
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package'

   Require stack:
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
   - C:\Users\Jake\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:

Ionic CLI : 6.17.0 (C:\Users\Jake\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/vue 5.9.3

Capacitor:

Capacitor CLI : 3.4.0
@capacitor/android : not installed
@capacitor/core : 3.4.0
@capacitor/ios : not installed

Utility:

cordova-res : 0.15.3
native-run : 1.5.0

System:

NodeJS : v14.17.3 (C:\Program Files\nodejs\node.exe)
npm : 6.14.13
OS : Windows 10

Additional Information

Steps that weirdly don't result in the error:

  • Start the app from scratch
  • Click "View Script"
  • Click "Open New Feature"
  • Go back

It only triggers if I view a sibling page within the tabbed view first

@ionitron-bot ionitron-bot bot added the triage label Jan 25, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. Does this issue reproduce in Ionic 6? There was a very similar issue fixed in 6.0.1: bf8e436

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Jan 26, 2022
@ionitron-bot ionitron-bot bot removed the triage label Jan 26, 2022
@jake-newsom
Copy link
Author

@liamdebeasi Yes it appears so, I ran
npm install @ionic/vue@6.0.1 @ionic/vue-router@6.0.1

Reloaded my VSCode window and restarted ionic serve and can still reproduce the issue.

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Jan 26, 2022
@liamdebeasi liamdebeasi added package: vue @ionic/vue package type: bug a confirmed bug report labels Jan 26, 2022
@ionitron-bot ionitron-bot bot removed the triage label Jan 26, 2022
@liamdebeasi
Copy link
Contributor

Thanks for the issue. Can you try the following dev build and let me know if it resolves the issue?

npm install @ionic/vue@6.0.5-dev.1643229606.6368b84 @ionic/vue-router@6.0.5-dev.1643229606.6368b84

@jake-newsom
Copy link
Author

Tried it out on the sample project and it resolves the issue!

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #24665, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Feb 26, 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 Feb 26, 2022
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

Successfully merging a pull request may close this issue.

2 participants