- 
                Notifications
    You must be signed in to change notification settings 
- Fork 95
fix: auto-resolve focus trap stack, if was changed outside of controller #7277
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
Conversation
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.
Code makes sense to me
| this one can be backported to fix the stable8 issue, right? | 
        
          
                src/utils/focusTrap.ts
              
                Outdated
          
        
      | * If the actual stack is different from the paused one, there were changes | ||
| * outside of this controller, so we assume it's self-regulated and do not unpause. | 
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.
Can you add an explanation here? Why we only need to unpause if the length is the same
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.
It's the opposite of what is already written, do we need additional explanation here? I currently don't see how it could be expanded, please, advise
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.
Maybe just align with code?
| * If the actual stack is different from the paused one, there were changes | |
| * outside of this controller, so we assume it's self-regulated and do not unpause. | |
| * Only if the actual stack is the same as the paused one, there were no changes | |
| * outside of this controller, so we can save assume it's not self-regulated and we need to unpause. | 
But I also think the current comment is already explaining it well
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.
Will put PR description into composable comment, so devs can read and act from there at least. As it's not blocking, we should be able to follow-up with better explanation
…de of controller Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
f9a39bb    to
    5b0d865      
    Compare
  
    | /backport to stable8 | 
☑️ Resolves
useTrapStackControlclose-after-clickis closed -> unpause pausedStack (it has only [trap 0] from first step) -> trap 0 unpauses🖼️ Screenshots
🏚️ Before (Vue 2 at #7085)
2025-08-12_12h39_00.mp4
🏡 After (Vue 2)
2025-08-12_12h34_55.mp4
🏁 Checklist
stable8for maintained Vue 2 version or not applicable