Skip to content

fix(focus-trap): activate only when step content is visible (#126)#127

Merged
fatihsolhan merged 3 commits intomainfrom
fix/focus-trap-timing-issue-126
Jan 23, 2026
Merged

fix(focus-trap): activate only when step content is visible (#126)#127
fatihsolhan merged 3 commits intomainfrom
fix/focus-trap-timing-issue-126

Conversation

@fatihsolhan
Copy link
Copy Markdown
Owner

Summary

  • Fixes the "focus-trap must have at least one container with at least one tabbable node" error by watching ready state instead of show for focus trap activation

Problem

The focus trap was activating when show became true, but at that point ready was still false, causing visibility: hidden on the step content.
Elements with visibility: hidden are not considered tabbable by the focus-trap library, resulting in the error.

Solution

Changed the watch from show to ready, ensuring the focus trap only activates when the step content is actually visible and its elements are tabbable.

Fixes #126

- Move Nuxt module output to dist/nuxt/ for cleaner build structure
- Add support for Vue component refs in attachTo.element
- Add null-safe checks for element.style to prevent SSR errors
- Refactor interaction functions for better code clarity
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 23, 2026

Deploy Preview for v-onboarding canceled.

Name Link
🔨 Latest commit d723f68
🔍 Latest deploy log https://app.netlify.com/projects/v-onboarding/deploys/6973a9f43199610007322fbd

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 23, 2026

Deploy Preview for v-onboarding-docs canceled.

Name Link
🔨 Latest commit d723f68
🔍 Latest deploy log https://app.netlify.com/projects/v-onboarding-docs/deploys/6973a9f4374df6000832668c

@fatihsolhan fatihsolhan merged commit d11e94c into main Jan 23, 2026
10 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 23, 2026
## [2.12.2](v2.12.1...v2.12.2) (2026-01-23)

### Bug Fixes

* **focus-trap:** activate only when step content is visible ([#126](#126)) ([#127](#127)) ([d11e94c](d11e94c))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.12.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Focus-trap must have a container error on VBtn

1 participant