-
Notifications
You must be signed in to change notification settings - Fork 181
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: cv-tabs fails in focusout event when using router-link in a tab #1084
Conversation
✔️ Deploy preview for carbon-components-vue ready! 🔨 Explore the source changes: abf7996 🔍 Inspect the deploy logs: https://app.netlify.com/sites/carbon-components-vue/deploys/5fd396665538770007db5b25 😎 Browse the preview: https://deploy-preview-1084--carbon-components-vue.netlify.app |
Hey @lee-chase , First, thank you so much for maintaining this package, it's awesome and we love it. On the other hand, when you have a little time, can you please check this PR? Based on my tests, it fixed the issue and the code is right, but of course, I'm happy to take some comments. |
Hey @lee-chase, |
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.
Looks good although I'm usually keen to observer an issue before trying to fix it. Can you create a code sandbox demonstrating the issue?
Are you using the tabs as you remain navigation? Or do the tabs change a navigation parameter?
Just trying to understand you use case.
Here's what I meant https://codesandbox.io/s/eager-poitras-7lo88?file=/pages/index.vue Edit: |
Closes #1083
This PR changes the
cv-tabs
component, adds the event listeners onmount
and removes them inbeforeDestroy
, doing this withthis.$refs.tabs
wheretabs
is the root div which previously had the listeners attached as@focusout="onFocusout" @focusin="onFocusin"
.Changelog
M packages/core/src/components/cv-tabs/cv-tabs.vue