fix: auto-resolve focus trap stack, if was changed outside of controller#7277
Merged
fix: auto-resolve focus trap stack, if was changed outside of controller#7277
Conversation
Contributor
|
this one can be backported to fix the stable8 issue, right? |
ShGKme
reviewed
Aug 18, 2025
src/utils/focusTrap.ts
Outdated
Comment on lines
48
to
49
| * 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. |
Contributor
There was a problem hiding this comment.
Can you add an explanation here? Why we only need to unpause if the length is the same
Contributor
Author
There was a problem hiding this comment.
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
Contributor
There was a problem hiding this comment.
Maybe just align with code?
Suggested change
| * 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
Contributor
Author
There was a problem hiding this comment.
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
AndyScherzinger
approved these changes
Aug 18, 2025
…de of controller Signed-off-by: Maksim Sukharev <[email protected]>
f9a39bb to
5b0d865
Compare
susnux
approved these changes
Aug 18, 2025
Contributor
|
/backport to stable8 |
1 task
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☑️ 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