[stable8] fix(NcModal): use useTrapStackControl for pausing other focus traps
Backport of #7084
Warning, This backport's changes differ from the original and might be incomplete ⚠️
Todo
- [x] Review and resolve any conflicts
- [ ] Amend HEAD commit to remove the line stating to skip CI
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.
Maybe it's another issue 🤔
Steps: Talk -> Mobile width -> Expand left sidebar -> Open 'New conversation' dialog
In Vue 3:
there is only latest trap in the stack
In Vue 2:
left sidebar trap is paused, but focus is still trapped there. so should remain deactivated as before
Hello @Antreesy please what is the status of this? There is a bug where NcModal.clearFocusTrap() attempts to reactivate external focus traps no longer have valid DOM containers when cleaning up password dialogs spawned from NcActionInput contexts.
This can be seen in Nextcloud -> accounts -> create new group | rename group
After some spiraling from nextcloud/password-confirmation to nextcloud/dialogs it appears this is the fix which is still absent from the current stable used in nextcloud/server.
As written above, same fix isn't working with Vue2 Current state will remove an error coming from password-confirmation library, but break all places with 2+ active focus traps
https://github.com/nextcloud-libraries/nextcloud-vue/pull/7304