fix(NcModal): prevent focus trap race condition #8093
fix(NcModal): prevent focus trap race condition #8093susnux merged 3 commits intonextcloud-libraries:mainfrom
Conversation
susnux
left a comment
There was a problem hiding this comment.
Should we not also remove the onMounted(() => useFocusTrap()) ?
I added a null check in |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8093 +/- ##
==========================================
- Coverage 54.57% 54.41% -0.17%
==========================================
Files 104 104
Lines 3399 3398 -1
Branches 992 992
==========================================
- Hits 1855 1849 -6
- Misses 1305 1309 +4
- Partials 239 240 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Well its a useless function call as it will always fail 😉 But anyway: Can you please fix the failing linter? |
bfeeeab to
ba1d1d2
Compare
Perfect, I've fixed the linter part and did the |
susnux
left a comment
There was a problem hiding this comment.
Still think that the known-to-fail onMounted call should be removed but the fix itself seems to work fine!
Antreesy
left a comment
There was a problem hiding this comment.
Otherwise good. Although I'm also not seeing a point in keeping onMounted hook
|
This change doesn’t skip focus trap initialization if maskElement isn’t available it defers it until the element is present. Changes:
|
|
Would this fix #7946? |
75f40ee to
db5c2de
Compare
Signed-off-by: nikhil2297 <nikhillohar2297@gmail.com>
…available Signed-off-by: nikhil2297 <nikhillohar2297@gmail.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
db5c2de to
96de871
Compare
|
For @ShGKme I pushed one commit that solves the review comment. |
|
/backport to stable8 |
|
The backport to # Switch to the target branch and update it
git checkout stable8
git pull origin stable8
# Create the new backport branch
git checkout -b backport/8093/stable8
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 82881d9e d9e5508f 96de8716
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/8093/stable8Error: Failed to check for changes with origin/stable8: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
useFocusTrap:fallbackFocuswas specified but was not a node, or did not return a node #8090☑️ Resolves
fallbackFocuserror occurs whenonMountedcallsuseFocusTrap()before template refs are readyuseFocusTrap:fallbackFocuswas specified but was not a node, or did not return a node #8090🖼️ Screenshots
fallbackFocus was specified but was not a nodeoccurring ~30% of the time during modal mounting🚧 Tasks
useFocusTrap()to prevent race condition🏁 Checklist
stable8for maintained Vue 2 version or not applicable